Results 1 to 3 of 3

Thread: Tab Panel with dynamic child tab panel close error

  1. #1
    Sencha User
    Join Date
    Mar 2019
    Posts
    16
    Answers
    4
    Vote Rating
    1
      0  

    Default Tab Panel with dynamic child tab panel close error

    I'm using the TabPanel with dynamic tabs which get added as the user flows through the application. some of the tabs will have additional children TabPanels which also get tabs dynamically added as the user flows through the child TabPanel. All this is being done via adding and deleting tab items via Redux. The issue we are seeing is that when you close the parent tab and the child TabPanel has more than 1 tab the parent TabPanel is triggering the onDestroy event of the first child TabPanel tab. This triggers an action to update the child TabPanel redux state which is then causing the child TabPanel state to change triggering a rerender while destroying the child tabs. This is causing the error below to occur. My question is how can I determine that the parent TabPanel is what triggered the destroy of the child TabPanel so that I can bypass the Redux update of the child TabPanel redux state and update child TabPanel redux state via parent onDestroy event? I've attempted to use autoDestroy = false and onBefore with eventName values of destroy, beforedestroy and onDestroy but nothing seems to be causing these events to trigger.

    Code:
    Uncaught TypeError: Cannot read property 'destroyed' of null
        at filterByXType (ext.js:17096)
        at filterItems (ext.js:17070)
        at constructor._execute (ext.js:17232)
        at constructor.execute (ext.js:17208)
        at constructor.query (ext.js:17390)
        at constructor.query (ext.js:40254)
        at constructor.parseActiveTab (ext.js:89268)
        at constructor.updateActiveItem (ext.js:89327)
        at constructor.updateFn (ext.js:9648)
        at Object.resume (ext.js:14184)

  2. #2
    Sencha - Sales Team
    Join Date
    Feb 2012
    Location
    Fort Myers, Florida
    Posts
    42
    Vote Rating
    -8
      0  

    Default

    can you provide me with a complete example so I can reproduce this?
    Marc Gusmano
    Sales Engineer
    Sencha Inc.

  3. #3
    Sencha User
    Join Date
    Mar 2019
    Posts
    16
    Answers
    4
    Vote Rating
    1
      0  

    Default

    well might be a little bit tricky to get a complete sample since I have the tabs built around redux. I think my issue is more how can I capture before destroy of a tab event? I've attempted to use autoDestroy = false and onBefore with eventName values of destroy, beforedestroy and onDestroy but nothing seems to be causing these events to trigger. I'll work on getting a simple example together.

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
  •