minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question - Reorder items in same level

asith-w opened this issue · comments

Thank you for great library. could i know that is there way to reorder items in same level ?

as a example , if i drag and drop a item to same level ,currently it is dropped as subitem of target.
is it possible to drop item without creating sub item

image

For Drag and Drop at the same level, the default is to sort by name.

It is possible to do custom sorting using the sort property, but behavior such as inserting items at arbitrary positions is not possible in the current version.

I know that there are many requests for such a feature, so we recognize this as a high priority issue.

This issue is now supported in v1.5.0. Please refer to the README or the sample below for details.
https://codesandbox.io/s/placeholder-ts-w71l5

If you have any problems, please reopen this issue.