react-folder-tree
react-folder-tree copied to clipboard
Delete a "branch"
Hi,
When I perform tasks on any branch I can perfectly capture which of them I am referring to, with the "onChange". But if I try to delete a "branch" (for now I have only tried it in folders) when accessing the "state" through the path of the "event" (these are the parameters that onChange returns and that I used in the other tasks ) the branch in question is gone so I can't use its information.
Is there a way to capture the data (path, "_id",... whatever) so I can tell which branch I was trying to delete before it disappears?
I know you already have something implemented in the line...
handleCheck,
handleRename,
handleDelete,
handleAddNode,
handleToggleOpen,
but I have tried to use it by adding the following to the call to the component....
<FolderTree handleDelete={() => {console.log("handleDelete!!!!")}} ... />
But it's not working,
can i use the handleDelete? How ?
Thank you,
Ernesto