View as Markdown

API reference: @salmonui/data-grid/engine/sort

updateSortedOrderfunction

import { updateSortedOrder } from '@salmonui/data-grid/engine/sort';
function updateSortedOrder<Row>(input: RowModelSnapshot<Row>, previousOutput: Int32Array, delta: RowDelta, keys: readonly SortKey<Row>[], locale: string): Int32Array | null;

Incremental sort: the previous sorted order minus changed rows, with the changed rows of the new input inserted by binary search. Requires an ascending input (ties are broken by source index, which is what the stable full sort does for such an input). Null when a full sort is preferable.