Posted 30 November 2020, 10:12 pm EST
Hi Tam,
Instead of using the setCollapsed method, if you will use the isCollapsed property and instead of the click event, use the mousedown event, then the isCollapsedChanging event will be fired and will be raised before the itemClicked event.
For the checkbox issue, in the mousedown event handler, you can check whether the clicked element is not a checkbox and then expand/collapse the node accordingly.
https://jsfiddle.net/39fwkag7/3/
Also, the developers have added a collapseOnClick property in the TreeView which will be available in the next release. This property will work exactly like its name, it will collapse the node when its header is clicked.
~regards