[CLOSED] TabPanel example not work

  1. #1

    [CLOSED] TabPanel example not work

    the Example of link https://examples2.ext.net/#/TabPanel/Basic/Show_Hide/ does not work,
    Why?

    specifically the button "Show tab6" does not work

    and I need to do something similar in my project
    thanks
    Last edited by Daniil; Mar 08, 2013 at 4:11 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Thank you! We are investigating.

    Temporarily, use the following overriding:

    <script>
    	Ext.override(Ext.tab.Panel, {
    		addTab : function (tab, index, activate) {
    			if (tab.id && this.getComponent(tab.id) && tab.isVisible()) {
    				return;
    			}
    
    			var config = {};
    
    			if (!Ext.isEmpty(index)) {
    				if (typeof index == "object") {
    					config = index;
    				} else if (typeof index == "number") {
    					config.index = index;
    				} else {
    					config.activate = index;
    				}
    			}
    
    			if (!Ext.isEmpty(activate)) {
    				config.activate = activate;
    			}
    
    			if (this.items.getCount() === 0) {
    				this.activeTab = null;
    			}
    
    			if (tab.hidden && Ext.isFunction(tab.show)) {
    				tab.show();
    			}
    
    			if (!Ext.isEmpty(config.index) && config.index >= 0) {
    				tab = this.insert(config.index, tab);
    			} else {
    				tab = this.add(tab);
    			}
    
    			if (config.activate !== false) {
    				this.setActiveTab(tab);
    				this.tabBar.setActiveTab(tab.tab);
    			}
    		}
    	});
    </script>
  3. #3
    Hello,

    It is rather a bug in the example, not in the addTab method.

    We corrected the sample. Now the Tab6 is added into the Bin collection, not into the Items. Please look at the corrected sample.
    https://examples2.ext.net/#/TabPanel/Basic/Show_Hide/
  4. #4
    Quote Originally Posted by Daniil View Post
    Hello,

    It is rather a bug in the example, not in the addTab method.

    We corrected the sample. Now the Tab6 is added into the Bin collection, not into the Items. Please look at the corrected sample.
    https://examples2.ext.net/#/TabPanel/Basic/Show_Hide/
    perfect, this works correctly, thanks

Similar Threads

  1. Replies: 0
    Last Post: Feb 14, 2011, 10:25 AM
  2. tabpanel doesn't work in IE8
    By maryam in forum 1.x Help
    Replies: 3
    Last Post: Aug 18, 2010, 5:49 AM
  3. Tabpanel and menu don't work together?
    By Santon_Lee in forum 1.x Help
    Replies: 2
    Last Post: Apr 10, 2010, 1:49 AM
  4. Replies: 3
    Last Post: Aug 21, 2009, 2:24 PM
  5. Replies: 2
    Last Post: Mar 16, 2009, 1:50 PM

Posting Permissions