clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
12.06k stars 610 forks source link

If you remove the dom node after dragging starts, there will be problems #1233

Open linxianxi opened 10 months ago

linxianxi commented 10 months ago

For example, if you select 12, 13, 18, and 19 and start dragging 12, the selected doms will be deleted during dragStart, and there will be problems with collision detection.

react-sortable-hoc doesn't seem to have this problem, but this library has some other problems

dnd-kit seems to judge the collision based on the position of the dom. Is there any way to delete the dom when dragging starts? @clauderic

beforeDrag:

image

dragging:

image
linxianxi commented 10 months ago

Seems to be the same problem https://github.com/clauderic/dnd-kit/issues/901 https://github.com/clauderic/dnd-kit/pull/588