Skip to content

Commit

Permalink
refactor: use custom PointerSensor to address orphaned event issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Dec 12, 2024
1 parent 32a3866 commit 12884c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/components/DragDropContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useRef,
useState,
} from "react";
import { defaultPreset, DragDropManager, PointerSensor } from "@dnd-kit/dom";
import { defaultPreset, DragDropManager } from "@dnd-kit/dom";
import { DragDropEvents } from "@dnd-kit/abstract";
import { DropZoneProvider } from "../DropZone";
import type { Draggable, Droppable } from "@dnd-kit/dom";
Expand All @@ -28,6 +28,8 @@ import { CollisionMap } from "../DraggableComponent/collision/dynamic";
import { ComponentDndData } from "../DraggableComponent";
import { isElement } from "@dnd-kit/dom/utilities";

import { PointerSensor } from "./PointerSensor";

type Events = DragDropEvents<Draggable, Droppable, DragDropManager>;
type DragCbs = Partial<{ [eventName in keyof Events]: Events[eventName][] }>;

Expand Down

0 comments on commit 12884c5

Please sign in to comment.