# maxSnapshots

Maximum data snapshots retained in memory. Older snapshots may be removed.

Canonical: https://grid.syidax.com/docs/options/maxSnapshots/

<a id="meaning"></a>

## What does this API do?

Maximum data snapshots retained in memory. Older snapshots may be removed.

<a id="contract"></a>

## Exact input and result types

```typescript
maxSnapshots: number
```

| Item | Value |
| --- | --- |
| JavaScript name | maxSnapshots |
| HTML attribute | max-snapshots |
| Default | 20 |
| Input type | number |

<a id="usage"></a>

## Usage flow

Set this on a property of the Grid element. In HTML, you can also use the max-snapshots attribute. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

<a id="recipes"></a>

## Feature explanations and examples

- [Data snapshot](https://grid.syidax.com/docs/features/snapshots.md) — Snapshots retain rowData at a point in time for comparison with current data or another snapshot. They differ from view-state APIs that save column widths, filters, and focus.
