SYIDAX / DATA GRID

데이터 스냅샷

특정 시점의 원본 데이터를 저장하고 복원합니다.

시작하기
데이터 스냅샷샘플 주문 데이터
120 rows
Grid를 불러오는 중입니다…
최근 결과

앱에서 captureSnapshot('작업 전')을 호출하고 반환된 스냅샷 ID를 보관하세요.

코드 보기
현재 미리보기

사용 가이드

#

대량 수정 전의 주문 데이터를 따로 보관하고, 나중에 비교하거나 되돌려야 할 때 사용합니다.

앱에서 연결하는 순서

  1. 작업 전 데이터 보관

    앱에서 captureSnapshot('작업 전')을 호출하고 반환된 스냅샷 ID를 보관하세요.

  2. 수정 후 비교

    데이터를 바꾼 뒤 새 스냅샷을 만들면 두 시점의 차이를 비교할 수 있습니다. 목록 조회로 이름과 시점을 확인하세요.

  3. 복원 대상 확인

    앱에서 복원할 시점을 사용자에게 확인한 뒤 restoreSnapshot에 ID를 전달하고 결과를 확인합니다. 이후 편집에 영향을 줄 수 있습니다.

확인할 결과

특정 시점의 데이터 상태를 보관해 변경 전후를 비교하거나 복원할 수 있습니다.

하단 상태 저장 버튼은 열·필터 같은 화면 설정을 저장합니다. 데이터 스냅샷 버튼이 아니며 이 페이지에는 별도의 스냅샷 실행 UI가 없습니다.

알아두면 쉬운 용어

데이터 스냅샷
특정 시점의 행 데이터를 담은 기록입니다.
Grid state
열·정렬·필터·선택 같은 화면 구성을 담은 상태입니다.

핵심 API 예시

등록된 Grid 요소를 grid로 참조하는 앱 코드입니다.

const snapshot = await grid.captureSnapshot('작업 전');
console.log(snapshot, await grid.listSnapshots());

API reference

#

나머지 속성1
Attribute / Property타입 / 기본값설명
maxSnapshots
number기본값 20Cap on retained rowData snapshots (oldest evict first).
이벤트2
이벤트detail 타입설명
{ id: string; name: string; rowCount: number }Fires when a rowData snapshot is captured.
{ id: string; name: string; rowCount: number }Fires when a rowData snapshot is restored.
메서드5
메서드 / 인수반환 타입설명
name?: string
Promise<string>capture the current `rowData` as a named snapshot (a deep copy, immune to later edits) and return its id. A version bookmark, distinct from undo/redo. The list is bounded by `maxSnapshots` (oldest evict first).
Promise<SnapshotMeta[]>the retained snapshots, newest last, without their row payloads.
id: string
Promise<boolean>delete a snapshot by id; returns whether one was removed.
idA: string, idB?: string
Promise<SnapshotDiff<GridRow>>diff snapshot `idA` → `idB` (added / removed / changed rows with per-field before/after). Omit `idB` to diff a snapshot against the CURRENT rowData. Rows match by `getRowId` (else `row.id`, else position). A missing id contributes an empty side.
id: string
Promise<boolean>restore a snapshot: replace `rowData` with a fresh deep copy of the snapshot's rows (re-cloned so later edits don't taint the stored version) and emit `rowDataChanged` with the computed added / updated / removed (matched by getRowId) plus `snapshotRestored`. Returns false when the id is unknown. Undo/redo continues on top of the restored state.