Reputation: 5209
I want to collapse all the panels in the accordion by default. For me first panel always active.
Guys please suggest how to fix the problem?
Upvotes: 3
Views: 7273
Reputation: 1
In Accordian layout create one dummy collpased panel like
{
xtype: 'panel', // << fake hidden panel
hidden: true,
collapsed: false
}
For Example In accordian layout items
{
xtype: 'panel', // << fake hidden panel
hidden: true,
collapsed: false
},{
xtype:'panel',
title:''Panle1'
},{
xtype:'panel',
title:''Panle2'
}
This should work.
Upvotes: 0
Reputation: 56
In ExtJS 4.2.1 you can add an extra panel, set it as hidden but expanded. You'll now be able to close all the visible panels. NOTE: This doesn't work in ExtJS 4.2.2
Upvotes: 4
Reputation: 69
Using ExtJs 4.2.2,
collapsed: true
in all panels, except the one you want expanded (so collapsed: false
)
It's working for sure, code tested.
Upvotes: 2
Reputation: 1
In extjs 3.2.1 at least, simply set the property
collapsed : true
on each of the panels in your accordion layout.
Upvotes: -1
Reputation: 4746
I believe this is not possible, but if you need this config for visual purpose, you can create a aditional, content empty panel, and put it as a last item in accordian, and make it first to expand by default, this way you can imitate all collapsed state! Cheers!
Upvotes: 0