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

DND will both trigger onChange and onMoveNode

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

Description

When I drag & drop a node in the tree, it will trigger onMoveNode for sure, but also trigger the onChange, however, in the onChange, there is only new treeData is passed in, there is no way to find if it is triggered by DND or opening(+)/closing(-) certain node actions. I would recommend not to reuse the onChange for DND to update the treeData, but using onMoveNode instead. Does this make sense ?

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.