I am using Extjs 5.0.0
I have an accordion with a number of panels. Here my requirement is to expand and collapse panel by clicking on the title.
On the first click it expanded, that's fine. while again clicking on the same title i want to collapse all the panels. Here its opening the very next panel.
I just tried by expanding a hidden panel. But here both hidden panel and the next panel to the clicked panel get expanded.
listeners:{
afterrender: function(panel){
panel.header.el.on('click', function() {
if (panel.collapsed) {
Ext.getCmp('hiddenpanel').collapse();
}
else {
Ext.getCmp('hiddenpanel').expand();
}
});
}
}
Is there any solution to solve this problem ?
Thanks