vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

Turn ON/OFF cascade selection after init #2463

Closed shahimclt closed 3 years ago

shahimclt commented 3 years ago

I have been looking for a way to turn on or off the cascade feature based on an external switch. Is there a way to change the cascade config at runtime or a callback to determine cascade behaviour? I could not find anything in the docs.

My only option currently is to traverse the tree and cascade manually

vakata commented 3 years ago

Officialy switching at runtime is not supported, but it shoudl work - target the instance's internal settings object: $('.jstree').eq(0).jstree(true).settings.checkbox.cascade = ...