Results 1 to 4 of 4

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

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
      0  

    Lightbulb 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Code:
    var tabbar = tabpanel.getTabBar();
    
    tabbar.on({
        tap : someFunction,
    
        delegate : '> tab',
        scope : tabpanel
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
      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
      0  

    Default

    Fixed with
    Code:
    order: 'before'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •