I've created a viewport with border layout and i was trying to have a 'Panels' accordion side bar in the west region, as below
Ext.create('Ext.container.Viewport', {
layout : 'border',
items : [{
xtype : 'panel',
region : 'west',
title : 'Panels',
layout : {
type : 'accordion'
},
items : [
{
title : 'Item 1',
html : 'Content 1'
},
{
title: 'Item 2',
html: 'Content 2'
}
]
}
]
});
This does not work as ExtJS is giving me a 'Layout run failed' message. Either one of the two options below solves the problem but it's not what I want:
- Remove title config for the accordion panel.
- Add a width config to the accordion panel.
Is there any way to set the title without setting width?