Skip to content

Review and Restore

Compare an activity, then hover or focus its restore action to recover the previous value. Only sample data changes.

The audit panel lets users inspect grid changes without leaving the page. Common review flows include full-grid history, selected-row history, selected-cell history, user filtering, date filtering, action-type filtering, and old/new value comparison.

Scoped Views

Switch between full-grid, selected-row, and selected-cell history without changing the underlying audit records.

Live Sync

The panel refreshes after new audit records, provider-loaded batches, and restore events from other UI controls.

Policy-Aware Restore

canRestore, beforeauditrestore, and immutable let the app decide which restore actions users can run.

Portable Exports

Generate filtered CSV or JSON exports for reporting, support workflows, or backend handoff.

Use the plugin instance when you need audit data in custom UI:

const plugins = await grid.getPlugins();
const auditHistoryPlugin = plugins.find(
(plugin) => plugin instanceof AuditHistoryPlugin,
);
const records = auditHistoryPlugin?.getRecords({ userId: 'avery-stone' });
const cellHistory = auditHistoryPlugin?.getCellHistory('invoice-123', 'status');
const rowHistory = auditHistoryPlugin?.getRowHistory('invoice-123');
const lastStatusChange = auditHistoryPlugin?.getLastChange('invoice-123', 'status');
const stats = auditHistoryPlugin?.getStats();

Restore helpers return true when a restore was applied:

auditHistoryPlugin?.restoreCell(change);
auditHistoryPlugin?.restoreRow('invoice-123');
auditHistoryPlugin?.restoreTransaction(transactionId);

Cell, row replacement, and transaction restores follow the normal edit pipeline. The restore is recorded as restore-cell, restore-row, or restore-transaction without a duplicate edit record.

Query helpers return defensive copies, so application code cannot accidentally mutate the internal audit log. For named restore points, see snapshots. Restore permissions are covered in policies and privacy.