Results 1 to 2 of 2

Thread: I have a tab that doesn't remove when i call the Remove Function. What could be?

  1. #1
    Sencha User alexbariv's Avatar
    Join Date
    May 2009
    Location
    Mrida, Venezuela
    Posts
    67

    Question I have a tab that doesn't remove when i call the Remove Function. What could be?

    Hi everybody!

    I have a tabs bar that has some default tab, and then while you use the application another tabs are dinamically added to the bar, but, when i close some of this dinamically tabs, they dont remove at all. So, the last content that is show in those tabs never goes away, and new tabs always get the content from the las closed one.

    All this new tabs has the closable flag true, and the problem happens only when i click on the X button of this tabs.

    Weird enough, when I check wich methods are called, some times calle the beforeRemove and the Remove, and other times only the beforeRemove and never the remove method.

    So, what could be? How can I overload the method or function in the X closable button?, to force the remove event in all cases.

    Thanks in advance.
    Think like an action person, act like a thinking person

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    Calling TabPanel.remove(targetTab) removes 'targetTab' from the TabPanel's child collection, but the targetTab is still a valid component and is still rendered in the DOM.

    Try calling TabPanel.remove(targetTab, true) to force destruction of the tab being removed.

    Also, if you don't want the targetTab destroyed (because you want to use it later), you must call targetTab.hide() after TabPanel.remove(targetTab).
    Last edited by friend; 27 Apr 2011 at 8:35 AM. Reason: Additional verbage.

Similar Threads

  1. remove() doesn't remove label
    By zedascouves in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Feb 2011, 9:45 AM
  2. [FIXED] FormPanel.remove(Field) doesn't remove label
    By baluba in forum Ext GWT: Bugs (1.x)
    Replies: 6
    Last Post: 18 May 2008, 12:17 PM
  3. [2.0b1][CLOSED] FieldSet component remove doesn't remove label
    By iaresean in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 15 Oct 2007, 2:25 AM

Posting Permissions

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