Skip to content

RowReorderDetails

type RowReorderDetails = {
afterRowId: string | undefined;
beforeRowId: string | undefined;
orderedRowIds: string[];
revert: () => void;
rowId: string;
};
Property Type Description
afterRowId string | undefined ID of the row this one now sits after, or undefined if it is first.
beforeRowId string | undefined ID of the row this one now sits before, or undefined if it is last.
orderedRowIds string[] The rows you passed in data, by ID, in the order they are now in.
revert () => void Puts the row back where this drag found it, leaving earlier drags alone since data may not have caught up with those. Safe to call late: it does nothing if the rows moved again, or if new data already replaced the order.
rowId string ID of the row that moved, as given by getRowId.