How to prevent checkbox from being checked when a node is clicked on JSTree?

Viewed 99

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"]
    });
1 Answers
"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.

Related