Home > database >  React Antd Tree : get parent ID of selected Node
React Antd Tree : get parent ID of selected Node

Time:02-08

I'm using Tree of antd and i want to be able to console.log the parent of the selected node. This is an example : Image

When i select Leaf for example : i want to get

parent 1-0

id in the console

Shape of antd Tree's node object

One of my experience using antd is that their doc does not have the best explanations so sometimes you have to go through a lot of examples to fully understand the antd API

  •  Tags:  
  • Related