Note: I have already read the following threads:
- Get checked nodes in a jsTree
- How to get checked nodes in jquery jstree
- Trying to get a list of checked items on change_state in jstree
I have a multilevel jstree with multiple sibling parent nodes and several children under each parent node.
Whenever any node gets checked/unchecked, I want to receive the list of all checked nodes. I did this using the following method:
$("#jstree-picker").on("check_node.jstree uncheck_node.jstree", function (event, data) {
console.log(data.selected);
});
When I check/uncheck any of the leaf nodes (lowest-level children), the above code prints out the list of all selected nodes correctly. However, when I check/uncheck a parent node, all its children get checked/unchecked correctly, but they do not show up in the list of selected nodes!
Aucun commentaire:
Enregistrer un commentaire