How can I get the active or selected tab index in tab panel in sencha touch?
I am using tabpanel
in my application.
var tabpanel = Ext.ComponentQuery.query('mainViewport #mainTabPanel'); //use your item Id / reference here
var activeTab = tabpanel.getActiveTab();
var activeTabIndex = tabpanel.items.indexOf(activeTab);
I had to use:
tabpanel.getActiveItem();
Was getting this error on getActiveTab:
getActiveTab is not a function
var activeTab = tabPanel.getActiveTab();
var currentStep = tabPanel.items.indexOf(activeTab);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With