@gridkitjs/react 0.0.0-dev-20261109132710 → 0.0.0-dev-20261109133348

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1362,7 +1362,7 @@ function useDragReorder({
1362
1362
  (signal) => startDragReorder(id, grabElement, event, {
1363
1363
  resolveTarget: (clientX, clientY, movedId) => handlers.current.resolveTarget(clientX, clientY, movedId),
1364
1364
  onState(state) {
1365
- if (state.draggedId !== null) {
1365
+ if (state.kind === "dragging") {
1366
1366
  openedDragId.current = state.draggedId;
1367
1367
  }
1368
1368
  setDrag(state);
@@ -1377,10 +1377,11 @@ function useDragReorder({
1377
1377
  openedDragId.current = null;
1378
1378
  }
1379
1379
  }
1380
+ const dragging = drag.kind === "dragging" ? drag : null;
1380
1381
  return {
1381
- draggedId: drag.draggedId,
1382
- dropTarget: drag.dropTarget,
1383
- ghostTransform: drag.ghostTransform,
1382
+ draggedId: dragging?.draggedId ?? null,
1383
+ dropTarget: dragging?.dropTarget ?? null,
1384
+ ghostTransform: dragging?.ghostTransform ?? null,
1384
1385
  startDrag,
1385
1386
  justDragged
1386
1387
  };