Results 1 to 2 of 2

Thread: NavigationBar - how to disable or hide button as user navigates?

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Vote Rating

    Default NavigationBar - how to disable or hide button as user navigates?

    I have added a NavigationBar to my Sencha Touch 2 project, and it automatically adds a 'back' button when I push a view in response to a press of a button in that nav bar.

    The problem is, that same button is still visible and the user can click it again, which pushes the same view again. It's just not a good UI experience, and causes some other issues. SO, is there a way either automatically or manually to either hide, disable, or some other best practice to prevent the button from being used if the user is already looking at the view that button is going to push?

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    You can listen to the activeitemchange event on the navigation view to then show/hide or enable/disable the button based on the new item.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

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