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)