[BUG] Switch view, recursions

After upgrading to 5.4.5 switch won’t change on data from server. I am also having errors because of recursion.

I have datatable binded to form. All fields update, such as inputs etc. just switch stays the same.

For recursion I have no example.

Everything worked fine on 5.4.3

Hello,

Could you please provide more details on your case? As far as I can see, the switch control works smoothly in the mentioned conditions: https://snippet.webix.com/64hxbeix

Here is bug:
https://snippet.webix.com/hwzf3joq

I use data feed and in data switch parameter is not 1 but true (“switchValue”: true). Switch is always off.

https://snippet.webix.com/bajr3xpz
https://docs.webix.com/api__link__ui.switch_checkvalue_config.html
https://docs.webix.com/api__link__ui.switch_uncheckvalue_config.html

I set parameter checkValue and now is working.
But this is really bad way!
Json has boolean and switch should work as boolean not as a string. Why I have to set checkValue to “true”. Default checkValue is set to 1 and 0 it should be true and false (this is JavaScript not C, there are booleans). I didn’t check if it is a string (“1”) or number (1). But in my second case…

…I also found why I have recursion. Because checkbox value is now “0” or “1” (yes string) and in JavaScript if (“0”) is true. So now I have to parseInt. I mean this is bad. Why is there no boolean in the first place?