# sortRowOrder (@salmonui/data-grid/engine)

> The sortRowOrder function of @salmonui/data-grid/engine: Stable multi-key sort of order (source indexes; null = identity over rows). Returns a new array; the input is never written.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine/sortRowOrder

```ts
import { sortRowOrder } from '@salmonui/data-grid/engine';
```

Also exported from `@salmonui/data-grid/engine/sort`.

Entry index: https://salmonui.dev/docs/reference/data-grid/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine.md).

## Reference

Kind: function

```ts
function sortRowOrder<Row>(rows: readonly Row[], order: Int32Array | null, keys: readonly SortKey<Row>[], locale: string, warm?: readonly CompiledColumn<Row>[]): Int32Array;
```

Stable multi-key sort of `order` (source indexes; null = identity over
`rows`). Returns a new array; the input is never written.
