jsTree disable some of the checkboxes -
using jstree (3.1.0+) checkbox plugin possible allow not checkboxes check - disable of them?
i found solution old versions of jstree here jstree disable checkbox didn't work on jstree 3.1.0+ versions.
solution of hiding checkbox jstree hide checkbox working, if click on folder, hidden checkbox checked anyway.
thanks.
keep in mind unless using checkbox.tie_selection false, selecting , checking same thing.
so can call .disable_node() on nodes want disabled.
edit: use latest code repo (note - not 3.1.1, latest code): https://github.com/vakata/jstree/archive/master.zip
you can specify checkbox_disabled state:
<div id="jstree"> <ul> <li data-jstree='{"checked":true}'>checked</li> <li data-jstree='{"checkbox_disabled":true}'>checked</li> </ul> </div> in json of course:
{ "id" : "test node", "state" : { "checkbox_disabled" : true } } you can change disabled state of checkbox @ runtime using enable_checkbox(node) , disable_checkbox(node).
Comments
Post a Comment