handleDrag on drop instead of while dragging

This commit is contained in:
Aarni Halinen
2022-07-24 21:22:16 +03:00
parent 98edf1a8bf
commit e3b64ab144
+1 -1
View File
@@ -13,7 +13,7 @@ const Draggable = ({
// accept receives a definition of what must be the type of the dragged item to be droppable
accept: type,
// This method is called when we hover over an element while dragging
hover(item: { index: number }) { // item is the dragged element
drop(item: { index: number }) { // item is the dragged element
if (!ref.current) {
return;
}