[ Grouplist ] Detect the switch between levels

Hello,

I have a grouplist and a checkbox. With the checkbox the user can select all items in the Group but after he returns to the start items are still being selected.

Which event should i use to detect the switch between levels ? Want to unselect all items when the user returns to the beginnig .

Snippet if needed : https://webix.com/snippet/c97ef0e6

Have a good day !

Hello,

Grouplist doesn’t have rich API, so you will have to check the same.getOpenState() for hidden/shown subitems:

onItemClick:function(id){
       var state = this.getOpenState();
       if(state.parents.indexOf(id)!==-1)
          this.unselectAll(); 
}

https://webix.com/snippet/68567bb1

Thank you very much !!!