Skip to content

Commit b338d3e

Browse files
committed
fix collision detection for kanban
1 parent 4024063 commit b338d3e

File tree

1 file changed

+2
-2
lines changed
  • src/design/components/organisms/Kanban

1 file changed

+2
-2
lines changed

src/design/components/organisms/Kanban/hook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
Over,
1414
MeasuringStrategy,
1515
pointerWithin,
16-
getFirstCollision,
1716
} from '@dnd-kit/core'
1817
import { sortableKeyboardCoordinates } from '@dnd-kit/sortable'
1918
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
@@ -74,8 +73,9 @@ function useMultiContainerDragDrop<
7473
pointerIntersections.length > 0
7574
? pointerIntersections
7675
: rectIntersection(args)
77-
let overId = getFirstCollision(intersections, 'id')
7876

77+
let overId: string | null = null
78+
intersections.forEach((intersection) => (overId = intersection.id))
7979
if (overId != null) {
8080
const overContainer = containers.find(
8181
(container) => container.id === overId

0 commit comments

Comments
 (0)