table_setSorting
function table_setSorting<TFeatures, TData>(table, updater): void;Defined in: features/row-sorting/rowSortingFeature.utils.ts:43
Routes a sorting updater through the table's sorting change handler.
The updater may be a next SortingState array or a function of the previous
sorting state, matching the instance table.setSorting behavior. State
owners receive an equality-guarded updater so structurally equal sorting
values preserve the owner's existing reference.
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
Parameters
table
Table_Internal<TFeatures, TData>
updater
Returns
void
Example
table_setSorting(table, (old) => [...old, { id: 'age', desc: true }])