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

NameExtendsDefault ValueComments
DataValidRowData(None)

Function Parameters

NameDefinitionComments
rowsRowDef<Data>[]

an array of row data of the type RowDef.

idRowId

the id of the row to move.

destIndexnumber

the destination index of the row to move.

Return Type

RowDef<Data>[]