Reputation: 104821
I'm using jsTree with checkboxes, and it checks all the parent nodes when selecting a child.
Is there a way to select each node individually regardless to the hierarchy?
Currently:
Desired:
Here's my code:
$(function () {
$('#tree').jstree({
"checkbox": {
"two_state": true,
"real_checkboxes": true,
//this is supposed to fix it but it doesn't
"override_ui": true
},
"plugins": ["themes", "ui", "checkbox"]
});
$('#tree').jstree("hide_icons");
$('#tree').jstree("hide_dots");
});
Here is the documentation.
Upvotes: 3
Views: 2890
Reputation: 356
Using 3.3.8 version of jsTree, yes, instead of using two_state:true
, use "three_state": false
in checkbox plugins.
@shakib is right above. For complete and working source code, you can refer https://everyething.com/Example-of-jsTree-to-get-all-checked-nodes#GetAllCheckedNodeWithTriStateDisabled
Upvotes: 0