Skip to content

Commit

Permalink
fix(react-repeater-dnd-kit): change collisionDetection strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Jun 10, 2024
1 parent 5ca9f98 commit b642e8e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { ReactNode, useCallback, useMemo, useState } from 'react'
import {
closestCenter,
DndContext,
DragEndEvent,
KeyboardSensor,
Expand Down Expand Up @@ -63,6 +64,7 @@ export const RepeaterSortable = ({ children }: {
}}
onDragEnd={onDragEnd}
onDragCancel={onDragCancel}
collisionDetection={closestCenter}
>
<RepeaterActiveEntityContext.Provider value={activeItem}>
<SortableContext items={entities} strategy={verticalListSortingStrategy}>
Expand Down

0 comments on commit b642e8e

Please sign in to comment.