bkrem / react-d3-tree

:deciduous_tree: React component to create interactive D3 tree graphs
https://bkrem.github.io/react-d3-tree
MIT License
1.09k stars 270 forks source link

Allow D3 event filtering #369

Closed chingmunn closed 2 years ago

chingmunn commented 2 years ago

Thank you for taking the time to report an issue with react-d3-tree!

Feel free to delete any questions that do not apply.

Are you reporting a bug, or opening a feature request?

Feature request

What is the actual behavior/output?

Click events are not working as expected on nodes that are interactive. E.g. when the node has an input element or Material-UI TextField.

What is the behavior/output you expect?

Drag and pan events to not be triggered when clicking on elements within an interactive node. We could pass d3 event filters as props for the Tree component.

Or, add a interactiveNode boolean type prop to Tree. If true, drag and pan handlers only bind to the Tree svg elements.

Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?

https://codesandbox.io/s/smoosh-hooks-fefwz

What version of react-d3-tree are you using?

v3.1.1