# DataSourceEvent (@salmonui/core/data)

> The DataSourceEvent type of @salmonui/core/data: Change notification from a data source. rows is always the complete new row array; the id lists let the engine update incrementally.

Canonical: https://salmonui.dev/docs/reference/core/data/DataSourceEvent

```ts
import type { DataSourceEvent } from '@salmonui/core/data';
```

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

## Reference

Kind: type

```ts
type DataSourceEvent<Row> = {
    readonly type: 'reset';
    readonly rows: readonly Row[];
    readonly totalRowCount?: number;
} | {
    readonly type: 'patch';
    readonly rows: readonly Row[];
    readonly updated: readonly RowId[];
    readonly added: readonly RowId[];
    readonly removed: readonly RowId[];
    readonly totalRowCount?: number;
};
```

Change notification from a data source. `rows` is always the complete new
row array; the id lists let the engine update incrementally.
