-
3 Nov 2012 8:23 AM #1
First panel in accordion multi layout is always expanded
First panel in accordion multi layout is always expanded
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.1
- Ext 4.1.1 rev a
- Safari 6.0.1
- Chrome 22.0.1229.94
- HTML5
- When using an accordion layout with the multi config, the first panel is always expanded, even when it is explicitly set to collapsed:false.
- Create a panel with accordion layout.
- Add several sub-panels.
- Set all sub-panels to collapsed:true except for the last one which should be collapsed:false.
- Last panel is expanded
- All other panels are collapsed
- First and last panel are both expanded.
- All other panels are collapsed
HELPFUL INFORMATIONPHP Code:Ext.create('Ext.Panel', {
title: 'Example',
width: 100,
renderTo: Ext.getBody(),
layout: {
type: 'accordion',
align: 'stretch',
// switch to false to see expected behavior
multi: true
},
defaults: {
height: 100
},
items: [
{
xtype: 'panel',
title: 'panel 1',
html: 'panel 1',
collapsed: true},
{
xtype: 'panel',
title: 'panel 2',
html: 'panel 2',
collapsed: true},
{
xtype: 'panel',
title: 'panel 3',
html: 'panel 3',
collapsed: true},
{
xtype: 'panel',
title: 'panel 4',
html: 'panel 4',
collapsed: false},
]
});
See this URL for live test case:
http://jsfiddle.net/GdQtk/
Debugging already done:- none
- One workaround is to attach a listener to the first panel for the beforerender event. In the listener, set panel.collapsed = true to force the first panel to a collapsed state.
- only default ext-all.css
- OS X 10.8.2
- Windows 7 Pro SP1
Last edited by mpost; 3 Nov 2012 at 10:09 AM. Reason: fix code formatting
-
3 Nov 2012 3:03 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
Thanks for the report! I have opened a bug in our bug tracker.
-
4 Nov 2012 9:13 PM #3
FYI, due to some recent refactoring, this is already fixed for 4.2.0.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7687
in
4.2.0.


Reply With Quote