PDA

View Full Version : [CLOSED] Collapse panel throws error



machinableed
Jun 05, 2012, 2:13 AM
Hi there,

I'm trying to collapse a panel on the click of button via a listener/handler:


buttons.Add(Html.X().Button()
.Listeners(listeners =>
{
// listeners.Click.Suce
listeners.Click.Handler = "#{store1}.reload();#{pnlSearchForm}.collapse(true)"; //"
})
.Text("Search"));

but I get the following error:


collapseDir.substr is not a function


is this a known bug?

geoffrey.mcgill
Jun 05, 2012, 3:29 AM
Hi,

If you're passing a parameter with the .collapse() function, the first parameter should be a string, which is the collapse direction.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-method-collapse

The second optional parameter is a boolean, to animate or not.

Hope this helps.