reorderDragable

reorderDragable function is used for reordering items within or across droppable areas in a drag-and-drop interface, using the DraggableLocation structure.

Example

Params
paramDescriptionTypeDefault
quoteMapAn object where the keys represent different droppable areas (lists), and the values are arrays of items in each.T extends Record<string, unknown[]>-
sourceThe starting location of the dragged item. This contains the droppableId and index of the item.{droppableId: string; index: number;}-
destinationThe target location where the item is being dropped, containing the droppableId and index.{droppableId: string; index: number;}-
Return
returnDescriptionTypeDefault
quoteMapA new object with the updated lists, reflecting the reordered items either within the same list or between different lists.T-