-
3 Nov 2012 9:46 AM #1
Unable to specify non-collapsible panels in accordion layout
Unable to specify non-collapsible panels in accordion layout
REQUIRED INFORMATIONExt 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, 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).
- 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.)
- Last panel is always expanded and cannot be collapsed.
- All other panels are collapsed and can all be closed.
- First and last panel are both expanded.
- Last panel can be collapsed.
HELPFUL INFORMATIONPHP 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},
]
});
See this URL for live test case:
http://jsfiddle.net/YpSN8/1/
Debugging already done:- none
- 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;}}}
- only default ext-all.css
- OS X 10.8.2
- Windows 7 Pro SP1
Last edited by mpost; 3 Nov 2012 at 7:27 PM. Reason: correct sample code
-
3 Nov 2012 3:23 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,666
- Vote Rating
- 435
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.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 Nov 2012 7:28 PM #3
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.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7688
in
4.2.0.


Reply With Quote