How do I get the currently active item’s index number (and not active item’s id) on a card layout?
The following code will return active item’s id:
Ext.getCmp('my-wizard').getLayout().activeItem.id];
What if I don’t want to define an id for my component items and I just want to access active item’s index number?
I couldn’t find a built-in quick and easy way, but the following would work:
If this was something that you wanted to do often, you could add it to the
CardLayoutprototype:Then you could use it with: