0

I am trying to create an accordion layout where collapse and expand is not working at all. I am using ext-4.1.0.

I have created a View and adding this view to another panel using a controller. After adding the collpase and expand is having a weird behaviour. + icon is not changing to - and not expanding on 2nd click.

Here is the code

            Ext.define('AM.view.MyView' ,{
                extend:'Ext.panel.Panel',
                title: 'Accordion Layout',
                alias:'widget.myView',


                layout: {
                    type: 'accordion',
                    titleCollapse: false,
                    animate: true,
                    activeOnTop: true
                },
                width:300,
                height: 300,
                defaults: {
                    bodyStyle: 'padding:15px'
                },

                items: [{
                    title: 'Panel 1',
                    html: 'Panel content!',
                        floatable:false

                },{
                    title: 'Panel 2',
                    html: 'Panel content!',
                    floatable:false
                },{
                    title: 'Panel 3',
                    html: 'Panel content!',
                    floatable:false
                }]
            });                 

Just visted 1 link (http://www.sencha.com/forum/showthread.php?247396-4.1.3-Accordion-Layout-not-working-when-dynamically-adding-items) but no help.

Thanks in advance for your help

aswininayak
  • 933
  • 5
  • 22
  • 39

1 Answers1

0

It seems like this is a known Sencha bug, and according to the bug report, it has been fixed in ExtJs 4.2.0

The best thing you could do is download 4.2.0 here -> http://www.sencha.com/forum/showthread.php?251214-Ext-JS-4.2-Beta-is-Now-Available&goback=%2Egde_4423985_member_195603826

Alternatively, you could see if you can find a patch on the net and apply that, or write your own patch and apply that yourself.

Cheers

Baz

BigBaz
  • 83
  • 4