3 ms·
Does it miss Delete functionality for folders/files (I see rename) or I just dont see it?
by aivisol 5y ago
Does it miss Delete functionality for folders/files (I see rename) or I just dont see it?
- jameskerr 5y agoThis is a controlled component, so all mutation of the tree data structure will need to happen in the tree's parent component. Add a function in your node renderer (maybe after clicking a trash icon), that deletes the node from the tree state. The component will re-renderer and your node will be gone. I was thinking of making a generic tree manager class to provide basic functions (move, rename, add, delete) for managing the tree data structure in the parent component. Maybe I'll call it "Arborist"!