View change history
Record and query edit history.
Options
Changes below update the Grid and code immediately.
Audit history is enabled here. Edit a Quantity cell and press Enter.
View code
Sample data included in the code · 6 rows
Usage guide
#Record edits so users can later inspect when and how order values changed.
Try it yourself
- Create a change
Audit history is enabled here. Edit a Quantity cell and press Enter.
- Inspect the edit result
The latest result above the code view shows the edited row and changes. The next operation replaces it with one new result.
- Read accumulated history
Click Read audit log above the table to inspect getAuditLog(). In your app, query relevant conditions and display a separate history view.
Track and query changes, including before/after values.
Latest results shows only the last operation. Use Read audit log for accumulated records and connect server storage for long-term retention.
Useful terms
- auditLog
- A setting enabling edit audit history.
- getAuditLog
- A method querying changes recorded by the Grid.
Key API examples
Application code that references the registered Grid element as grid.
grid.auditLog = true;
console.log(await grid.getAuditLog());API reference
#Other properties2
| Attribute / Property | Type / Default | Description |
|---|---|---|
| auditLog | booleanDefault: false | enable the audit trail: a bounded, append-only log of row/cell/ selection mutations and undo/redo transitions. Read it via getAuditLog and subscribe to auditLogChanged. Off by default (zero overhead). |
| auditLogMax | numberDefault: 1000 | Cap on retained audit entries (oldest evict first). |
Events1
| Events | Detail type | Description |
|---|---|---|
{ entry: AuditEntry } | Fires per entry appended to the audit trail (when `audit-log` is on). |
Methods6
| Method / Arguments | Return type | Description |
|---|---|---|
| filter?: AuditLogFilter | Promise<AuditEntry[]> | The audit trail entries (optionally filtered). Empty when off. |
Promise<void> | Clear the audit trail (seq keeps advancing; never reused). | |
| filter?: AuditLogFilter | Promise<string> | The audit trail as a CSV string (flat union columns, filterable). |
| filter?: AuditLogFilter, pretty?: boolean | Promise<string> | The audit trail as a JSON array string (structure preserved). |
| fileName?: string, filter?: AuditLogFilter | Promise<void> | Download the audit trail as a CSV file. |
| fileName?: string, filter?: AuditLogFilter | Promise<void> | Download the audit trail as a JSON file. |
Explore each feature
Learn when to use each feature and how to configure it. Each guide identifies live examples and features you connect in your app.