nosferatu500 / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://nosferatu500.github.io/react-sortable-tree/
MIT License
148 stars 51 forks source link

Runtime Error on dragging nodes quickly. #70

Open UeharaYou opened 8 months ago

UeharaYou commented 8 months ago

It seems that there's some async issues on managing target IDs while rendering node / placeholders.

==== Environment ==== Mac mini M2 | macOS 14.3 | Firefox 118.0.1 & Safari 17.3 | React 18.2 (It's device and OS dependent and works fine when viewing from my iOS devices.)

==== Ways to Reproduce ==== Placeholder failed to render and dragging a node rapidly over a tree could possibly throw a run-time error (which is impossible to catch since it's raised from the React-dnd bundle).

==== Error Message ==== Expected targetIds to be registered. invariant@http://localhost:3000/static/js/bundle.js:1610:24 checkInvariants@http://localhost:3000/static/js/bundle.js:10076:68 hover@http://localhost:3000/static/js/bundle.js:10053:20 @http://localhost:3000/static/js/bundle.js:10375:43 @http://localhost:3000/static/js/bundle.js:141623:31

==== Media ==== https://github.com/nosferatu500/react-sortable-tree/assets/48004590/64b13272-bc25-4271-8331-c94eedee64b8

cashwanikumar commented 4 months ago

having same issue,

    "react-dnd": "13.0.1",
    "react-dnd-html5-backend": "12.1.1",

changing to this version works