dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

Handle cases where `id` passed to `useDraggable` or `useDroppable` is nullish

Open clauderic opened this issue 2 years ago • 0 comments

Originally posted by @flexa-david in https://github.com/clauderic/dnd-kit/discussions/782#discussioncomment-2887581

Hi @clauderic, thanks for your response - turns out it was a data issue on my side. For what it's worth, it was because the id that was being used in the useSortable was undefined (perhaps in SSR), and it was stuck in isDragging === true, due to undefined === undefined in https://github.com/clauderic/dnd-kit/blob/8fbbfd79df7ff9343017f3067d04f1636a745f02/packages/core/src/hooks/useDraggable.ts#L61

clauderic avatar Jun 06 '22 14:06 clauderic