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

> The orderLeaves function of @salmonui/data-grid/engine: Leaves in runtime order: the explicit order first, then the remaining leaves in definition order.

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

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

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 orderLeaves<Row>(leaves: readonly CompiledColumn<Row>[], order: readonly ColumnId[] | null): CompiledColumn<Row>[];
```

Leaves in runtime order: the explicit order first, then the remaining leaves in definition order.
