How the react antd tree onCheck event is triggered.

how does antd click the X on the right to trigger the checkbox event on the left, causing the selected checkbox to cancel
"antd": "^ 3.10.1",
clipboard.png

Feb.28,2022

in react, the presentation is determined by the data. You need to have a method that can change the data of the left component. When the right component clicks X, the calling method changes the selected property of the item corresponding to the left data to false.
as for the specific operation, it depends on what you use to manage the data of this component. And your component hierarchy to decide how to pass the modification method.
you can try writing a demo in codesandbox , and then post the link.

Menu