clauderic / clauderic/react-sortable-hoc

Is there a way to create a sortable tree with react-sortable-hoc or react-beautiful-dnd?

Open
#745 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

I'm trying to create a tree of lists where I can reorder the list and also drag elements inside other elements and not only above and ender other elements.
* but the problem is when I use ` react-sortable-hoc` or `react-beautiful-dnd` I can only reorder the list of elements but I have no idea how to drag elements on another element to make them a child and parent elements.
* In the following example you can I have an element with sub.
```
const rows = [
{ text: "Jhon" },
{ text: "alex" },
{ sub: [{ text: "first" }, { text: "second" }] }
];
```
* in this code and box thing can be more clear where I have a tree with draggable elements.
[codeSandBox](https://codesandbox.io/s/pensive-montalcini-7cp8b?file=/src/App.js:0-1355)

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.