1. #1
    Ext User
    Join Date
    Jan 2009
    Posts
    44
    Vote Rating
    0
    daveh0 is on a distinguished road

      0  

    Default how to deactivate all tabs

    how to deactivate all tabs


    In a TabPanel's config, if you do not set the activeTab option, it is initially rendered without any of the tabs activated. Is there a way to return the tabs to that state?

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,521
    Vote Rating
    377
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I do not see anything like that in the source code. As to content you could simulate it by hiding the active tab's body, I don't know how to handle the tab strip.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  3. #3
    Ext User
    Join Date
    Jan 2009
    Posts
    44
    Vote Rating
    0
    daveh0 is on a distinguished road

      0  

    Default


    I hacked it (for now) by using creating a dummy tab as the last tab in the tabPanel. Using CSS, I set the tab's display to none so it is never displayed in the tab strip. Then when I need to deactivate all of the tabs, I activate the dummy/hidden tab using setActiveTab.

    A few follow-up questions:
    1. I thought I would be able to hide the tab by setting the config option, hidden: true. This does not hide the tab or its body. Am I using it incorrectly?
    2. When the tabs are rendered, the containing <li> element has a blank class attribute. How can I add a value for that?

      Ex: I'd like
      HTML Code:
      <li id="parent2__child_dummy" class="">
      to render as
      HTML Code:
      <li id="parent2__child_dummy" class="x-hidden">

Thread Participants: 1