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

> The RowModelSnapshot interface of @salmonui/data-grid/engine: Visible row model. Rows are stored by reference in source with parallel sourceIds; order maps a visible index to a source index (null means the identity order). No per-row wrapper objects exist.

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

```ts
import type { RowModelSnapshot } 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: interface

```ts
interface RowModelSnapshot<Row> {
    readonly source: readonly Row[];
    readonly sourceIds: readonly RowId[];
    readonly order: Int32Array | null;
    readonly count: number;
    readonly groups?: GroupTreeSnapshot | null;
    readonly aggregates?: AggregateModelSnapshot | null;
    readonly view?: RowModelView | null;
    readonly pinned?: Int32Array | null;
}
```

Visible row model. Rows are stored by reference in `source` with parallel
`sourceIds`; `order` maps a visible index to a source index (null means the
identity order). No per-row wrapper objects exist.

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source: readonly Row[];` |  |  |
| `sourceIds` | `readonly sourceIds: readonly RowId[];` |  |  |
| `order` | `readonly order: Int32Array \| null;` |  | Data rows in view order (source indexes). With a `view`, the data order the view windows into. |
| `count` | `readonly count: number;` |  | Visible rows: `order.length`, or `view.count` when a view mixes in synthetic rows. |
| `groups` | `readonly groups?: GroupTreeSnapshot \| null;` | optional | Group structure from the `group` stage (grouping module). |
| `aggregates` | `readonly aggregates?: AggregateModelSnapshot \| null;` | optional | Aggregate results from the `aggregate` stage (aggregates module). |
| `view` | `readonly view?: RowModelView \| null;` | optional | Visible row model mixing synthetic rows (group captions and footers) with data rows, addressed by visible index without a materialized list. When present, `count === view.count` and index lookups go through the view. |
| `pinned` | `readonly pinned?: Int32Array \| null;` | optional | Pinned rows: source indexes of the rows at visible indexes `[0, pinned.length)`, in sort order. They are outside the page window, the groups, and the detail rows. Absent when no row is pinned. |
