From 0aba7563a2a9502fc740e551b303b4c2968ac4be Mon Sep 17 00:00:00 2001 From: Quentin Dreyer Date: Wed, 18 Sep 2024 15:56:58 +0200 Subject: [PATCH] fix: expose item dragIds for DragPreview --- modules/react-arborist/src/dnd/drag-hook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/react-arborist/src/dnd/drag-hook.ts b/modules/react-arborist/src/dnd/drag-hook.ts index 22ac564..421e3e3 100644 --- a/modules/react-arborist/src/dnd/drag-hook.ts +++ b/modules/react-arborist/src/dnd/drag-hook.ts @@ -20,7 +20,7 @@ export function useDragHook(node: NodeApi): ConnectDragSource { // This is fired once at the begging of a drag operation const dragIds = tree.isSelected(node.id) ? Array.from(ids) : [node.id]; tree.dispatch(dnd.dragStart(node.id, dragIds)); - return { id: node.id }; + return { id: node.id, dragIds }; }, end: () => { tree.hideCursor();