0

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:

  1. Remove title config for the accordion panel.
  2. Add a width config to the accordion panel.

Is there any way to set the title without setting width?

PSWai
  • 1,198
  • 13
  • 32

1 Answers1

1

'Border' layouts must have a 'center' region. This should work when you add a center region to your parent border layout.

BillyTom
  • 2,519
  • 2
  • 17
  • 25
Brett
  • 2,775
  • 4
  • 27
  • 32