SortableJS / react-sortablejs

React bindings for SortableJS
http://sortablejs.github.io/react-sortablejs/
MIT License
2.07k stars 211 forks source link

[bug] 对组件再次封装,在其他地方多次调用,不能拿到originalEvent信息 #259

Open lujiewei521 opened 2 years ago

lujiewei521 commented 2 years ago

Describe the bug Encapsulate the component again and call it many times in other places, so you can't get originalEvent information, Because of the problem of nested containers, the logic is the same. I want to encapsulate the reactsortable again, but when the component moves inside, onMove cannot get the originalEvent information. I understand that this is the event native data, which should be available

To Reproduce Steps to reproduce the behavior:

image

image

Expected behavior When dragging in the calling function. The onmove event cannot get the originalEvent information, image

Versions - Look in your package.json for this information: react-sortable = ^6.1.4 react = ^18.1.0

Additional context Add any other context about the problem here.

Please provide examples, screenshots or a code sandbox for faster resolution times.