event.preventDefault()}
onMouseDown={(event) => {
// Keep touch scrolling available on the row, with dragging on the handle.
if (!event.target.closest("button")) listeners?.onMouseDown?.(event);
}}>
{file.media_type.startsWith("image/") ? : }
Drag to reorder. Keyboard: Space to pick up, ↑/↓ to move, Space to drop.
}
`Picked up ${describe(active.id)}, position ${position(active.id)} of ${attachments.length}.`,
onDragOver: ({ active, over }) => over ? `${describe(active.id)}, position ${position(over.id)} of ${attachments.length}.` : undefined,
onDragEnd: ({ active, over }) => over ? `Dropped ${describe(active.id)} at position ${position(over.id)} of ${attachments.length}.` : "Reordering canceled.",
onDragCancel: () => "Reordering canceled. File order unchanged.",
},
}}
onDragStart={({ active }) => setActiveId(active.id)}
onDragCancel={() => setActiveId(null)}
onDragEnd={({ active, over }) => {
setActiveId(null);
if (!busy && over && active.id !== over.id) onMove(active.id, over.id);
}}>
file.url)} strategy={verticalListSortingStrategy}>