Results 1 to 2 of 2

Thread: Show/Hide a tab panel dinamically

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    44
    Answers
    3

    Default Show/Hide a tab panel dinamically

    Hello,

    i'm wondering how to show/hide a panel dinamically.
    This is what's happening.
    My client receives a json string in which there's a flag. true or false.

    hence, i tried to do something like:
    Code:
                                if(jsonstring.manager === false){
                                    Ext.ComponentQuery.query('#tabManageProperties')[0].hide();
                                } else {
                                    Ext.ComponentQuery.query('#tabManageProperties')[0].show();
                                }
    The tab is, by default, hidden.
    Actually this doesn't work. I mean, if i "show" it (the else branch of the if), then the content of the tab is shown, but the "tab button" is not visible on the tab bar.

    What i'd like to have is to see the "tab button" appearing on the tab bar, without loosing the focus on the tab that is open in that moment.

    Anyone of you have an idea how could i do that? what's the property that should be modified?
    Thanks in advance.

  2. #2
    Sencha Premium User
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781
    Answers
    102

    Default

    You'll need to use the tabConfig config property in the tab you want to dynamically show/hide.

    Regards,
    Brian


Tags for this Thread

Posting Permissions

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