I don't want the checkbox to be checked when the node is clicked, only when the checkbox itself is clicked. The code below was copied from the JSTree website I think, and I copied a few lines from a tutorial to enable checkboxes.
$('#ajaxx').jstree({
'core' : {
'data' : {
"url" : (node)=>{
return node.id === '#' ?
'./dirfilesapi.php?dirID=-1' :
('./dirfilesapi.php?dirID='+node.id);
},
"dataType" : "json" // needed only if you do not supply JSON headers
}
},"checkbox" : {
"keep_selected_style" : false
},
"plugins": ["checkbox"]
});
"checkbox" : {
"keep_selected_style" : false , "whole_node": false, "tie_selection": false
},
Solved. I don't remember if it was whole_node or tie_selection that did it. I think it was both, with only whole_node set to false it was working only for either selection or deselection.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.