このコミットが含まれているのは:
2026-11-01 01:12:29 +09:00
コミット 8a4c1d1220
5個のファイルの変更、43行の追加、10行の削除
+3 -2
ファイルの表示
@@ -2,7 +2,7 @@ import { DndContext, DragOverlay, KeyboardSensor, MouseSensor, TouchSensor,
closestCenter, useSensor, useSensors } from '@dnd-kit/core'
import { SortableContext, arrayMove, horizontalListSortingStrategy,
sortableKeyboardCoordinates } from '@dnd-kit/sortable'
import { useEffect, useRef, useState } from 'react'
import { useEffect, useId, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { CSS } from '@dnd-kit/utilities'
@@ -16,6 +16,7 @@ const SortableColumns = ({ ids, fixed = [], name, onChange, children }: {
onChange: (ids: string[]) => void; children: (ids: string[]) => ReactNode },
) => {
const [mounted, setMounted] = useState (false)
const scope = useId ()
useEffect (() => setMounted (true), [])
const [active, setActive] = useState<string | null> (null)
const drag = useRef<{ id: string; ids: string[] } | null> (null)
@@ -35,7 +36,7 @@ const SortableColumns = ({ ids, fixed = [], name, onChange, children }: {
drag.current = null
setActive (null)
}
return <DndContext sensors={sensors} collisionDetection={closestCenter}
return <DndContext id={scope} sensors={sensors} collisionDetection={closestCenter}
accessibility={{ announcements: {
onDragStart: event => name (String (event.active.id)).text,
onDragOver: event => event.over == null ? undefined : name (String (event.over.id)).text,
+1
ファイルの表示
@@ -92,6 +92,7 @@ const SortableList = (
}
return (
<DndContext
id={scope}
sensors={sensors}
collisionDetection={args => {
const hits = pointerWithin (args)