このコミットが含まれているのは:
@@ -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 { useRef, useState } from 'react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
|
||||
@@ -15,6 +15,8 @@ const SortableColumns = ({ ids, fixed = [], name, onChange, children }: {
|
||||
ids: string[]; fixed?: string[]; name: (id: string) => { text: string; language: string }
|
||||
onChange: (ids: string[]) => void; children: (ids: string[]) => ReactNode },
|
||||
) => {
|
||||
const [mounted, setMounted] = useState (false)
|
||||
useEffect (() => setMounted (true), [])
|
||||
const [active, setActive] = useState<string | null> (null)
|
||||
const drag = useRef<{ id: string; ids: string[] } | null> (null)
|
||||
const motion = useClientMotion ()
|
||||
@@ -56,7 +58,7 @@ const SortableColumns = ({ ids, fixed = [], name, onChange, children }: {
|
||||
<SortableContext items={ids} strategy={horizontalListSortingStrategy}>
|
||||
{children (ids)}
|
||||
</SortableContext>
|
||||
{typeof document !== 'undefined' && createPortal (<DragOverlay adjustScale={false}
|
||||
{mounted && typeof document !== 'undefined' && createPortal (<DragOverlay adjustScale={false}
|
||||
style={{ width: 'max-content', height: 'auto', maxWidth: 'calc(100vw - 2rem)' }}
|
||||
dropAnimation={motion.reduced ? null : {
|
||||
duration: motion.duration ('drop'), easing: motion.easing,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする