liquor-tree icon indicating copy to clipboard operation
liquor-tree copied to clipboard

Is there a way to block a node from collapsing / expanding

Open fazzomurata opened this issue 4 years ago • 4 comments

Is there a way to block nodes from collapsing / expanding? We have a form as subnode which has to be evaluated. Once the form is invalid every node collapse or expand of another node should be blocked temporarely until the form is valid. Is there any solution for that?

fazzomurata avatar Oct 21 '19 11:10 fazzomurata

Yes. You can disabled nodes witch should be not collapsable. See Docs

 this.$refs.tree.find({}, true).forEach(node => node.enable())

amsik avatar Oct 28 '19 16:10 amsik

I've found that it might be useful to add methods disable and enable to the Selection API. It will be added to 0.2.67 version. So you can do like:

this.$refs.tree.find(node => node.hasChildren(), true).enable()

amsik avatar Oct 28 '19 17:10 amsik

Sounds great. Thank you.

fazzomurata avatar Nov 04 '19 16:11 fazzomurata

dude the checkbox size is too big. 20px width and height would be nice. I can't override it with css either

abhion avatar Oct 16 '20 06:10 abhion