'How to get Only selected node in Antd Tree

I'm using Antd and I want to create a second Tree with all Checked nodes in the First Tree, Take a look here please

When i click on the Validate button, a new Tree Shouls be showed and contain only selected fields in the parent one. How Can i Achieve it ? Code : https://codesandbox.io/s/modern-browser-glh4n?file=/index.js

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source