Checkchange was the first thing I tried. The reason I went with onCheckboxClick was to know what box was clicked from within the event.
And I think the checkchange event is acting inconsistently when unchecking boxes.
When I check Leaf 2, the checkchange will fire twice (Parent and Leaf 2), correctly.Code:[ ] Grandparent [ ] Parent [ ] Leaf 1 [ ] Leaf 2 [ ] Leaf 3 [ ] Leaf 4
But, when I uncheck Leaf 2 it will fire 6 times(!). Twice for Leaf 2 and once for each node (Parent, Leaf 1, Leaf 3, Leaf 4).
onCheckboxClick fires only once. And I can easily see if the node is a parent and what nodes should be added into/removed from the array.
Please, tell me if I've missed something using the checkchange event.