Results 1 to 3 of 3

Thread: tabConfig in Ext.tab.Panel defaults breaks tabpanel's functionality

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1

    Default tabConfig in Ext.tab.Panel defaults breaks tabpanel's functionality

    tabConfig in Ext.tab.Panel defaults breaks tabpanel's functionality. This bug is highly related to http://www.sencha.com/forum/showthread.php?244600, but that one is closed, and discussion there went to irrelevant directions (like how to use shared xtypes etc.)

    Ext version tested:
    Ext 4.2.1

    Browser versions tested against:
    Chromuim Version 30.0.1599.114 Ubuntu 12.04 (30.0.1599.114-0ubuntu0.12.04.3)
    FF 25.0.1 (firebug 1.12.5 installed)

    DOCTYPE tested against:
    html

    Description:
    Using tabConfig in tab panel's defaults property makes tabs titled with the same text, and tabs except the first can't be clicked.

    Ext.tab.Panel's defaults is for sharing attributes among tabs. Sharing tabConfig: { flex: 1 } among tabs should be done by using Ext.tab.Panel's defaults: { tabConfig: { flex: 1 } }. This produces the bug.

    This patch fixes the bug:

    Ext.define('Ext.tab.Panel', {
    ...
    onAdd: function(item, index) {
    ...
    -cfg = item.tabConfig || {},
    +cfg = item.tabConfig ? Ext.clone(item.tabConfig) || {},

    Steps to reproduce the problem:
    http://jsfiddle.net/wQGY2/

    The result that was expected:
    I have 2 tabs: "AAA" and "BBB"

    The result that occurs instead:
    I have two "AAA" tabs.

  2. #2

    Default

    Fiddle updated: https://fiddle.sencha.com/#fiddle/227

    Actually Object.create is enough instead of Ext.clone. Tabs just need a new reference inherited from the common tabConfig.

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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