Closed adheesh24 closed 2 years ago
you can add div in lable and add onclick that only
The best way to do it is to handle the events in the component you pass as label
.
const ExampleTree = () => (
<Tree label={<div>Root</div>}>
<TreeNode label={<button onClick={() => console.log('clicked')}>Child 1</button>} />
</Tree>
);
Is there a way to trigger an event when clicked on a Node? I want to open a pop-up on click of the nodes.
Any help would be appreciated.