1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
    Marc-QNX is on a distinguished road

      0  

    Lightbulb Feature request: Add itemtap event to Ext.tab.Panel

    Feature request: Add itemtap event to Ext.tab.Panel


    I'd like to request that an itemtap event be added to Ext.tab.Panel. This event would trigger whenever the user taps an item in the tab panel's tab bar even if this is the item that is already active, with the event parameters including the previously active item and the newly tapped item - similar to activeitemchange.

    This would allow us to offer a better user experience as we could use this as a shortcut to the 'home' screen of a tab in cases where users could be several panels deep in a specific tab.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,641
    Vote Rating
    898
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    var tabbar = tabpanel.getTabBar();
    
    tabbar.on({
        tap : someFunction,
    
        delegate : '> tab',
        scope : tabpanel
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
    Marc-QNX is on a distinguished road

      0  

    Default


    While that does trigger an event, there's no way to determine which tab was active before the tap event, which is required for the functionality that I'm trying to achieve.

    This is a bit confusing as the docs mention that the tap event is cancellable on the Tab object, so I would have assumed that it would trigger before the tab actually changes (which would let us know what was previously active) -- unless this is a bug?

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
    Marc-QNX is on a distinguished road

      0  

    Default


    Fixed with
    Code:
    order: 'before'

Thread Participants: 1