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

Keep depth of nodes while dragging

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

Description

Is there a way to keep nodes at a certain depth while dragging?

We defined 3 types of nodes in our application, and every node always needs to be on the same depth.
We basically have sth like this:
- Containers (depth 0)
- Videos (depth 1)
- Extra items related to the Video (depth 2)

What I basically need is a way to predefine the depth of any node in the treeData.
Currently we use the canDrop function to show that this item cannot be dropped at a different level, but it is kind of annoying to always move the mouse exactly to the correct depth as we have to add a lot of items to our 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.