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

Function handleDragEnd

src/components/data-table.tsx:393–402  ·  view source on GitHub ↗
(event: DragEndEvent)

Source from the content-addressed store, hash-verified

391 })
392
393 function handleDragEnd(event: DragEndEvent) {
394 const { active, over } = event
395 if (active && over && active.id !== over.id) {
396 setData((data) => {
397 const oldIndex = dataIds.indexOf(active.id)
398 const newIndex = dataIds.indexOf(over.id)
399 return arrayMove(data, oldIndex, newIndex)
400 })
401 }
402 }
403
404 return (
405 <Tabs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected