MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / handleSortEnd

Function handleSortEnd

data-browser/src/views/DocumentPage.tsx:246–253  ·  view source on GitHub ↗
(event: DragEndEvent)

Source from the content-addressed store, hash-verified

244 }
245
246 function handleSortEnd(event: DragEndEvent): void {
247 const { active, over } = event;
248 if (active.id !== over.id) {
249 const oldIndex = elements.indexOf(active.id);
250 const newIndex = elements.indexOf(over.id);
251 moveElement(oldIndex, newIndex);
252 }
253 }
254
255 /** Create elements for every new File resource */
256 function handleUploadedFiles(fileSubjects: string[]) {

Callers

nothing calls this directly

Calls 1

moveElementFunction · 0.85

Tested by

no test coverage detected