Skip to content

TableEditor.sortByColumn method

TableEditor › sortByColumn

Unofficial

Sort the table's body rows with the given comparator.

Signature:

sortByColumn(focusRow: number, col: number, compareFn: (a: TableCell, b: TableCell) => number): void

Parameters:

ParameterTypeDescription
focusRownumberRow to focus after sorting.
colnumberColumn index whose cells are passed to the comparator.
compareFn(a: TableCell, b: TableCell) => numberComparator receiving the two cells of col being compared.

Returns: void