lundi 25 décembre 2017

Get Checked Nodes in a jsTree When Checking/Unchecking Parent Nodes

Note: I have already read the following threads:

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