MCPcopy Create free account
hub / github.com/Codehagen/Badget / DragHandle

Function DragHandle

src/components/data-table.tsx:120–137  ·  view source on GitHub ↗
({ id }: { id: number })

Source from the content-addressed store, hash-verified

118
119// Create a separate component for the drag handle
120function DragHandle({ id }: { id: number }) {
121 const { attributes, listeners } = useSortable({
122 id,
123 })
124
125 return (
126 <Button
127 {...attributes}
128 {...listeners}
129 variant="ghost"
130 size="icon"
131 className="text-muted-foreground size-7 hover:bg-transparent"
132 >
133 <IconGripVertical className="text-muted-foreground size-3" />
134 <span className="sr-only">Drag to reorder</span>
135 </Button>
136 )
137}
138
139const columns: ColumnDef<z.infer<typeof schema>>[] = [
140 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected