frontend-collective / frontend-collective/react-sortable-tree

How to remove a node during map call back

Open
#440 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

I am trying to use the map function to 'remove' a node on a match condition.. but sort of as expected it is modifying the map as it is being iterated and getting item not found.

Other than generating a list of all the paths and then deleting them after the map is done.. is there a special way to remove a node from the treeMap during a map ?

I tried to mark this as a question but not sure how.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.