-
12 Dec 2011 7:51 PM #1
[PR3] Items of a tab panel do not fire 'show' when shown.
[PR3] Items of a tab panel do not fire 'show' when shown.
In 1.1.1, I used tabpanel's beforecardchange to trigger when a tab was being selected.
Now, it looks like there's no way to detect when a new tab is chosen in 2.0PR3.
On the tabpanel...
only seems to fire when setActiveItem is called directly, and not when a tab is selected.Code:listeners:{ activeItemChange:function(){} }
Unfortunately, 'show' is not fired on the items of the tabpanel, either, so it looks like there isn't a way to detect tab changes at all.
'show' should probably fire events for tabpanel children, and activeItemchange should fire when a tab is changed by the user. Either of these will resolve my particular issue, but both seem to be issues.
-
13 Dec 2011 10:40 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Thank you for the report.
-
19 Dec 2011 4:52 PM #3
Odd; this is working for me
'show one' gets logged when you first load the page.Code:Ext.setup({ onReady: function() { Ext.Viewport.add({ xtype: 'tabpanel', items: [ { title: 'one', html: 'one', listeners: { show: function() { console.log('show one'); } } }, { title: 'two', html: 'two', listeners: { show: function() { console.log('show two'); } } } ], listeners: { activeitemchange: function() { console.log('activeitemchange'); } } }); }
'show two' and 'activeitemchange' gets logged when you switch tab, by tapping the second tab and by using setActiveItem.
This is using PR3.
Can you use the above code and check if it works for you?Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1253
in
2.0.


Reply With Quote