View Full Version : Panel afterExpand\afterCollapse events

28 Aug 2012, 2:00 AM
Hello again, friends!

Currently i have a very strange issue with panel's expand\collapse events.

I have a couple of collapsible panels on a Window cmp and their expanding behavior very strange. I find some dependencies:
- then I expand 1st panel it's expand ok, but it's expandTool('\/' bottom arrows) not replaced to collapseTool('/\' top arrows) and if we see deeper panel.isCollapsingOrExpanding parameters have value 2. I guess that's happend because the afterExpand event was not fired and private afterExpand function not executed. Then if i try expand the second panel it's expand and collapse as I expect.
- then I expand 2nd panel at the beginning, it's expand\collapse ok and if after this I try to expand 1st panel it's also expand\collapse ok.

This pannels placed in different fieldset's and have a different content but I can't find what is the principal difference which provides such behavior.

And the second part of my question: am I right about that panel component not fires expand\collapse events? I tryed to add listeners for this events but seems it's not fired.

'expand': function(panel){
'collapse': function(panel){

Any ideas

28 Aug 2012, 3:52 AM

you can use following code:

Ext.create('Ext.panel.Panel', {
title: 'Hello',
width: 200,
html: '<p>Hello World! hjfhakhfk hfkla fda </p><p>fajgfaugfjakff fdf</p>',
, collapse:function(){alert('How r u ?')}
renderTo: Ext.getBody()

28 Aug 2012, 8:00 PM
well i found solution of my problem.

Don't know how it's depends from each other, but my window also have a radiogroup with list of radiofields. Then I removed radiogroup cmp and only stayed a radiofields it's all start work perfect.
Thank's for attention)