Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJS-7688
in
a recent build.
-
Sencha User
Unable to specify non-collapsible panels in accordion layout
REQUIRED INFORMATIONExt version tested:
Browser versions tested against:
- Safari 6.0.1
- Chrome 22.0.1229.94
DOCTYPE tested against:
Description:
- When using an accordion layout, all panels are forced to be collapsible: true. I want to arrange several panels so that a particular panel is always visible (cannot be collapsed).
Steps to reproduce the problem:
- Create a panel with accordion layout with multi: true.
- Add several sub-panels.
- Set all sub-panels to collapsed:true except for the last one which should be collapsible:false. (Collapsed vs. collapsible is intentional here.)
The result that was expected:
- Last panel is always expanded and cannot be collapsed.
- All other panels are collapsed and can all be closed.
The result that occurs instead:
- First and last panel are both expanded.
- Last panel can be collapsed.
Test Case:
PHP Code:
Ext.create('Ext.Panel', {
title: 'Example',
width: 100,
renderTo: Ext.getBody(),
layout: {
type: 'accordion',
align: 'stretch',
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',
collapsible: false},
]
});?
HELPFUL INFORMATION
See this URL for live test case:
http://jsfiddle.net/YpSN8/1/
Debugging already done:
Possible fix:
- One workaround is to attach a listener to the last panel for the beforerender event:
PHP Code:
listeners: {beforerender: function(panel, eOpts) {if (panel && panel.collapsible) delete panel.collapsible;}}}
Additional CSS used:
Operating System:
- OS X 10.8.2
- Windows 7 Pro SP1
Last edited by mpost; 3 Nov 2012 at 7:27 PM.
Reason: correct sample code
-
I think in your test case you need to have one of the items with collapsible : false correct? That's the bug you are reporting.
-
Sencha User
Oops, you're right. I copy/pasted the wrong code for this bug. I've edited the original post to add collapsible: false to the last panel and updated the jsfiddle link.