I have many panels on my site that all have the same configuration options. To make life simpler, I extended the Ext.Panel to
contain these default configuration options. The problem is the following:

  • You have the extended panel (say TPanel) that sets collapsible: true as its config option
  • You make a new TPanel without explictly putting collapsible: true in the initial config
  • You use this TPanel in a border layout and EXPECT it to collapse. It does collapse but does so incorrectly

BorderLayout relies on the component's initialConfig in order to make the panel collapsible. Lines 72 and 73 of
BorderLayout.js have this code:

 new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) :
      new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos);

I'm unsure if this is actually a bug or is intended.

You can either explicity put collapsible: true in the initial config:
new Ext.ux.TPanel({ collapsible: true, ....});
Or you can set
 this.initialConfig.collapsible = true
in initComponent() of the extended class.

Please go to http://outroot.com/extjs/bug1/ In order to see it in action.