PDA

View Full Version : Accordion Layout Issue



romain.monsterlet
2 May 2013, 9:20 AM
Hi everyone, this is my first thread on the community (I'm french btw, my english isn't very good) and I looked for an answer before asking my question :

The first panel of my accordion layout isn't collapsible and I have no idea why. I searched a long time without success. That would be great if someone knows why my code doesn't work (I'm using Sencha Architect 2.2.2)



Ext.define('MyApp.view.reconnaissance.scriptReconnaissance.moduleInfoFacture.FieldSet', {
extend: 'Ext.form.FieldSet',

id: 'moduleInfoFacture',
layout: {
type: 'accordion'
},
title: 'Paramétrage des entrées',


initComponent: function() {
var me = this;


Ext.applyIf(me, {
items: [
{
xtype: 'panel',
title: 'My Panel',
items: [
{
xtype: 'label',
text: 'My Label'
}
]
},
{
xtype: 'panel',
title: 'My Panel',
items: [
{
xtype: 'label',
text: 'My Label'
}
]
},
{
xtype: 'panel',
title: 'My Panel',
items: [
{
xtype: 'label',
text: 'My Label'
}
]
}
]
});

me.callParent(arguments);
}
});


Thanks.

chamacs
2 May 2013, 1:50 PM
I used your example and it worked just fine. The accordion layout is designed so one (and only one) panel is always expanded. Clicking on the first panel header will collapse it and expand the next panel.