From e3b64ab144fb8a65a885e92854d9dddf80d182ec Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Sun, 24 Jul 2022 21:22:16 +0300 Subject: [PATCH] handleDrag on drop instead of while dragging --- src/components/Draggable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Draggable.tsx b/src/components/Draggable.tsx index d4b6f53..a2a7c46 100644 --- a/src/components/Draggable.tsx +++ b/src/components/Draggable.tsx @@ -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; }