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);
}
});