mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 15:48:00 +00:00
feat: kanban use rectIntersection collision detection
This commit is contained in:
parent
73c52b7ea4
commit
7733e4d5fa
@ -5,6 +5,7 @@ import {
|
|||||||
useDroppable,
|
useDroppable,
|
||||||
useSensor,
|
useSensor,
|
||||||
useSensors,
|
useSensors,
|
||||||
|
rectIntersection,
|
||||||
} from '@dnd-kit/core';
|
} from '@dnd-kit/core';
|
||||||
import {
|
import {
|
||||||
SortableContext,
|
SortableContext,
|
||||||
@ -218,6 +219,7 @@ const InternalKanban = observer((props: any) => {
|
|||||||
<DndContext
|
<DndContext
|
||||||
autoScroll
|
autoScroll
|
||||||
sensors={sensors}
|
sensors={sensors}
|
||||||
|
collisionDetection={rectIntersection}
|
||||||
onDragStart={(event) => {
|
onDragStart={(event) => {
|
||||||
const el = event?.active?.data?.current?.nodeRef
|
const el = event?.active?.data?.current?.nodeRef
|
||||||
?.current as HTMLElement;
|
?.current as HTMLElement;
|
||||||
|
Loading…
Reference in New Issue
Block a user