Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/react/row-dnd/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ import { CSS } from '@dnd-kit/utilities'

// Cell Component
const RowDragHandleCell = ({ rowId }: { rowId: string }) => {
const { attributes, listeners } = useSortable({
const { setNodeRef, attributes, listeners } = useSortable({
id: rowId,
})
return (
// Alternatively, you could set these attributes on the rows themselves
<button {...attributes} {...listeners}>
// If you happen to have a problem with the drag handle not working, try setting the ref to `setNodeRef` attribute on this button but normally it should work fine without it
<button ref={setNodeRef} {...attributes} {...listeners}>
🟰
</button>
)
Expand Down