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

Edit node props before changing the tree

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

Description

Hi,
I am dragging external node (with react-dnd) to the sortable-tree. Before adding this external node, I would like to modify its props, for example adding "parent_id" to that node.
Is there any way to modify currently dragged node on 'just before drop'?
I saw that all information about current node can be accessed in function onMoveNode, but its called after onChange, so it would require map over the whole tree to find and modify node which was just added to the tree.

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.