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

Disabled node expanding

Open paulodiogo opened this issue 5 years ago • 3 comments

Can I block to expand or collapse a disabled node?

I tried the following => https://codepen.io/paulodiogo/pen/LoVJQv?editors=1010

The node "Social" is { expanded: false, disabled: true, selectable: false }, but is still expandable, can I block it to not expand or collapse?

Would a function for each state in options not be an option?

For example:

options: {
    isExpandable: function(node){ return !node.disabled; }
}

Can I create a PR?

Thank you!

paulodiogo avatar May 08 '19 00:05 paulodiogo

Hi. Yeah, I think it make sense.

amsik avatar May 13 '19 13:05 amsik

Any updates on this? I would love to have all nodes expanded by default and be able to disable expansion on a node

ryanrapini avatar Oct 11 '19 20:10 ryanrapini

Hi! Please check a new version (0.2.66)

amsik avatar Oct 16 '19 09:10 amsik