clauderic / clauderic/react-sortable-hoc
Dynamically adding list items to the list while dragging an item breaks the UX behaviour
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 959
- PR merge metrics
- No merged PRs in 30d
Description
I'm working on drag&drop function in a tree view with collapsible tree nodes. The tree is represented with a list, and each item has its indent, making it look like a tree.
When mouse-hovering a collapsed tree item for 1 second, I expand it, which means more items are added dynamically to the list.
Once more items are added, the drag&drop UX experience breaks and makes it not possible to continue dragging and end up with any useful drag&drop result.
In the following screenshot, we start with 2 sections: Mother (collapsed) and Father expanded.

After dragging "Father's other names" over Mother section, and holding for a second, the latter expands, and 4 new items are added dynamically.
After that, we continue to drag the element that is being dragged, but the UI is broken:

It would be nice to have some sort of a {{reIndex()}} callback that one can call after changing the content of the list (i.e. adding /removing sortable items, resizing them etc).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.