2022-01-17

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

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


from Recent Questions - Stack Overflow https://ift.tt/3zI2k5p
https://ift.tt/eA8V8J

No comments:

Post a Comment