riophae / vue-treeselect

A multi-select component with nested options support for Vue.js
https://vue-treeselect.js.org/
MIT License
2.91k stars 509 forks source link

How to disable an specific Node dynamically? #416

Open d4rkr3pt0r opened 4 years ago

d4rkr3pt0r commented 4 years ago

How can I make an specific node disable using click event? I'm adding isDisabled = true to the Node but treeselect does not refresh and react at all.

leonardohcb commented 3 years ago

Same problem here. I wanted to limit selected nodes disabling all unselected when length matches the limit.

Solved setting all nodes as isDisabled = false on treeselect options load (in my case, I'm using Delayed Loading), and after that, it reacts on changing dynamically the isDisabled prop of the node.

Hope this solution can help you.