path-tree
path-tree copied to clipboard
Remove element from tree, by id
trafficstars
Would it be possible to remove a path from the tree, by id?
Looking through the code, it looks like it might be possible, but I'm not exactly sure how I'd do it.
Yes, you can delete nodes and data by id.
See https://github.com/viz-rs/path-tree/blob/main/src/node.rs#L19, the node stores the id, so we can look it up recursively.
PR welcome. :)