peterh32 / react-drag-drop-container

ReactJS drag and drop functionality for mouse and touch devices
MIT License
154 stars 47 forks source link

Drag element does not reset when dropping not on target #78

Open achmad-firdaus-vpn opened 1 year ago

achmad-firdaus-vpn commented 1 year ago

Hello, looking at the demo I saw that the item's position is being reset after dropping anywhere outside the target

demo

But in my implementation somehow the item's position is not being reset when directly dropping outside of the target Clicking the dragged item once will reset the position, but the original element is still hidden, making the layout weird when trying to resize the view area (it seems that the ghost/drag element is still visible and the parent element is still invisible)

implementation

Implementation: https://codesandbox.io/s/drag-and-drop-heqsqx

Thank you for the library and I hope you have a great day!