1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    21
    Vote Rating
    0
    Supriya Kale is on a distinguished road

      0  

    Default Unanswered: Error while using fieldset

    Unanswered: Error while using fieldset


    Hi,
    I am using 'fieldset' so as to group few of the controls. But as soon as I try to specify 'collapsed' as true, I get js error saying 'targetContext' is undefined. Is there some other way around so as to set the fieldset collapsed initially?

    Please find my code below:

    Code:
    Ext.define('APP.view.SampleForm',{
    
        extend: 'Ext.form.Panel',
        alias:'widget.sampleform',
        layout:{
            type:'vbox'
        
        },
        padding:'5 5 5 5',
        renderTo: Ext.getBody(),
        
        items:[{
            xtype:'textfield',
            fieldLabel:'Name'
        },{
            // Fieldset in Column 2 - collapsible via checkbox, collapsed by default, contains a panel
            xtype:'fieldset',
            title: 'Show Panel', // title or checkboxToggle creates fieldset header
            columnWidth: 0.5,
            checkboxToggle: true,
            collapsed: true, // fieldset initially collapsed
            layout:'anchor',
            items :[{
                xtype: 'panel',
                anchor: '100%',
                title: 'Panel inside a fieldset',
                frame: true,
                height: 52
            }]
        }],
        initComponent: function(){
            this.callParent(arguments);
        
        }
    
    
    });

  2. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      0  

    Default


    Try adding collapsible: true, directly above collapsed: true. collapsible defaults to a value of false, if not configured manually..

Thread Participants: 1

Tags for this Thread