The Accordion Item is not collapses when use collapse() method

Hi Webix,
I have a “Collapse” button and a Accordion widget. I want the first Accordion Item collapses when user click on “Collapse” button. When user click again, Accordion Item will expand.

But it’s not working at the first time user click on “Collapse” button. When I click again, it’s working. I think this is a bug. Could you check it please?

I create a snippet here: http://webix.com/snippet/4645867e

Thank you so much.

ok, I found a solution. I must put $$(“accordion1”).collapse(); inside timeout funtion.
http://webix.com/snippet/c9f32c7a
Actualy, I don’t know why. Hope webix can explain a bit.

It is caused by the unnecessary data repainting. When you are clicking on the button, Angular detects the data change in the config of webix UI and forces UI repainting ( which resets collapse state )

It is some kind of bug in Webix-Angular integration. We will include a fix in the next update.

Good news. Our application is a Webix-Angular integration application. Webix has very good performance. We have Pro license a week ago. Thank you.