Data Change History Technical Reference

View as Markdown

Data Change History Options

DataChangeHistoryOptions

Options to manage the 'Data Change History Module', which provides an overview of all previous changes, giving the possibility to undo specific changes

Make Data Change History active by default

Default

false

Action button definition; can be used to implement undo functionality

Default

undefined

How many data changes are held in State at any one time; when limit is reached, oldest change(s) are deleted from memory

Default

undefined (all data changes are logged)

showDataChange?

(cellDataChangedInfo:CellDataChangedInfo<TData>) => boolean

Function specifying which data changes to include in Data Change History

Default

undefined (all data changes are logged)

Show all changes for a Cell or just the last one

Default

true

changeHistoryButton is a list of DataChangeHistoryButton objects:

showDataChange receives a CellDataChangedInfo:

CellDataChangedInfo

Defines a Cell Edit - includes full details of old and new values, the column and the enclosing Row

changedAt

number

Timestamp of change occurrence (in milliseconds)

Column in which cell is situated

Value after the change.

Absent when trigger is live.

Value before the change.

Absent when trigger is live.

preventEdit?

boolean

Whether the change was prevented by a validation rule

Primary Key Column's value for the row where edited cell is situated

rowData?

TData

Data in the Row

rowNode?

IRowNode<TData>

AG Grid RowNode that contains the cell

trigger?

'edit' | 'tick' | 'undo' | 'aggChange' | 'calculatedColumnChange' | 'live'

What triggered the change - user, background change, a reverted change, a
derived update on a Calculated Column whose source value changed, or a
live Alert rule turning true for the row (live: no old / new value,
column is the rule's first Scope column when it has one).


Data Change History API

DataChangeHistoryApi

The history of cell value changes: the log, the latest change for a cell, and undo.

Activates Data Change History tracking (or resumes it, if it is currently suspended)

Adds item to Data Change History log

Clears a Row in Data Change Grid

Deactivates Data Change History tracking and flushes the cache

The most recent change recorded for a cell.

Retrieves all data changes which are currently available

getDataChangeHistoryMode()
returns

'ACTIVE' | 'INACTIVE' | 'SUSPENDED'

Retrieves current Data Change History mode: 'ACTIVE', 'INACTIVE', 'SUSPENDED'

Opens Data Change History panel

Suspends data change history tracking

Reverts all data changes to previous values and returns GridCells that were undone

Reverts provided data change to its previous value and returns GridCell that was undone