feat: kanban use rectIntersection collision detection

This commit is contained in:
chenos 2021-08-24 15:02:46 +08:00
parent 73c52b7ea4
commit 7733e4d5fa

View File

@ -5,6 +5,7 @@ import {
useDroppable,
useSensor,
useSensors,
rectIntersection,
} from '@dnd-kit/core';
import {
SortableContext,
@ -218,6 +219,7 @@ const InternalKanban = observer((props: any) => {
<DndContext
autoScroll
sensors={sensors}
collisionDetection={rectIntersection}
onDragStart={(event) => {
const el = event?.active?.data?.current?.nodeRef
?.current as HTMLElement;