Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I select a node but not check/uncheck it in jsTree?

I want to select node in jsTree by click on title. Node should not change it checked state.

I read jsTree checkbox plugin documentation, but have not found about this. enter image description here

Is it possible?

like image 306
DanStopka Avatar asked Dec 27 '25 18:12

DanStopka


1 Answers

Yes, it is. Use the tie_selection checkbox config option when creating the tree:

$('#tree').jstree({
  checkbox : {
    tie_selection : false,
    ...

I would recommend reading about the other checkbox options in the API docs on jstree.com, as you might want to tweak those too (like whole_node : false).

Best regards, Ivan

like image 188
vakata Avatar answered Dec 30 '25 09:12

vakata



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!