PDA

View Full Version : Accordion Expand/Collapse



Mteixeira
15 Nov 2012, 8:43 AM
Hey,

I was wondering if there is a way to expand/collapse an accordion item be just clicking on the header instead of the plus/minus icons??

Thanks in advance for the help

Brett Hannah
15 Nov 2012, 10:01 AM
Hi,

That functionality appears to already exist, at least in ExtJS 4.1.1

Clicking on the header on the accordion on this examples page certainly displays the behaviour you're describing:
Example (http://edgeux.com/accent/index.html)

Brett Hannah
LinkedIn (http://www.linkedin.com/in/bretthannah)
EdgeUX (http://edgeux.com)

droessner
15 Nov 2012, 2:08 PM
The accordion layout has a config parameter called titleCollapse which allows you to control whether or not clicking the title bar expands/collapses the panel. This defaults to true so it should work already unless explicitly set to false.

See http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.Accordion-cfg-titleCollapse