PDA

View Full Version : Problem with Accordian Layout



glenho
28 Jan 2014, 2:42 AM
Hi

I have an Accordian and have an issue where if a user clicks the title bar of two different components quickly i.e. Before the other one has finished expanding. Then both will be displayed one of half the avail. area and the other the other half of the area.

Is this supposed to happen? I don't think this is right? I thought setting "multi" to false would fix this but it hasnt?

Any suggestions?

To replicate please copy run the follwing code and then click on "Panel 2" and then quickly "Panel 3" (while 2 is still expanding). You will end up with both 2 and 3 being shown



var accordian = Ext.create('Ext.panel.Panel', {
title: 'Accordion Layout',
width: 300,
height: 800,
defaults: {
// applied to each contained panel
bodyStyle: 'padding:15px'
},
layout: {
// layout-specific configs go here
type: 'accordion',
animate: true,
},
items: [{
title: 'Panel 1',
html: 'Panel content!'
}, {
title: 'Panel 2',
html: 'Panel content!'
}, {
title: 'Panel 3',
html: 'Panel content!'
}],
renderTo: Ext.getBody()
});

scottmartin
28 Jan 2014, 2:08 PM
That is a bug: EXTJSIV-11975

For now, you can turn off animate in layout config.

glenho
28 Jan 2014, 3:50 PM
Ok, thank you for answering. Ill do as you have stated.