react-d3-tree icon indicating copy to clipboard operation
react-d3-tree copied to clipboard

Collapse on custom button not entire object

Open LarsLiden opened this issue 6 years ago • 1 comments

I'd like to be able to add buttons to a node to take actions on that node but also allow the user to expand / collapse node by clicking on a different button.

Currently it looks like any click anywhere on the node will expand/collapse. I can disable that but then can't figure out how to add it back it on a custom button.

Would it be possible to provide a callback or reference so I can manually expand / collapse a node in code?

Thanks!

LarsLiden avatar Mar 03 '19 15:03 LarsLiden

A version of #107 does the trick. Would be nice to have something more direct, but that works!

LarsLiden avatar Mar 03 '19 16:03 LarsLiden