Function reorderRows Pro
Definition
reorderRows: <Data extends ValidRowData>(rows: RowDef<Data>[], id: RowId, destIndex: number) => RowDef<Data>[]Comments
Utility function for implementing the reorder callback function for the row reordering feature.
Returns
A new array where row to move is inserted into the destination index.
Type Parameters
| Name | Extends | Default Value | Comments |
|---|---|---|---|
| Data | ValidRowData | (None) |
Function Parameters
| Name | Definition | Comments |
|---|---|---|
| rows | RowDef<Data>[] | an array of row data of the type RowDef. |
| id | RowId | the id of the row to move. |
| destIndex | number | the destination index of the row to move. |
Return Type
RowDef<Data>[]