Problem with destroying component
I have a vicious problem with some Panel (with vbox/stretch layout), that I create a first time with some config, and I add it to a Container.
This Panel have 3 items (2 FormPanel and 1 GridPanel).
- I destroy the Panel (or remove it from container with autoDestroy true)
- I add a new Panel with the same config as the first time.
First, I thought it was the static IDs that I gave to some components which causes the bug, but even if I remove all these IDs, I have exactly the same problem.
I think it's caused by the destroy that is not a real complete destroy. When I list the elements of the Ext.ComponentManager (Ext.ComponentManager.all) just after my destroy call, I still have the Panel and all its descendants.
Can you please guide me to solve this annoying bug ?
Thanks in advance.
Uncaught TypeError: Cannot read property 'addCls' of null