# restoreSnapshot

Restores source data from a snapshot. Does not automatically save to the server or restore view state.

Canonical: https://grid.syidax.com/docs/methods/restoreSnapshot/

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

## What does this API do?

Restores source data from a snapshot. Does not automatically save to the server or restore view state.

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

## Exact input and result types

```typescript
restoreSnapshot(id: string): Promise<boolean>
```

| Arguments | Required | Type |
| --- | --- | --- |
| id | Required | string |

The return type is `Promise<boolean>`.

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

## Usage flow

After registering and initializing the Grid element, call grid.restoreSnapshot(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<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.
