Configuring Data Change History
Summary
- Set how Data Change History works and what is tracked
Data Change History is configured in dataChangeHistoryOptions on Adaptable Options:
| Property | Section on this page |
|---|---|
activeByDefault | Making Active by Default |
showDataChange | Limiting Data Changes |
showLastDataChangeOnly | Show All Data Changes |
maxDataChangesInStore | Limiting Data Changes in Store |
Find Out More
- See Data Change History Buttons for details of configuring the
changeHistoryButtonoption - Programmatic control (activate, suspend, read log, undo) uses Data Change History API
Making Active by Default
By default Data Change History tracking is inactive, and needs to be explicitly activated in the UI.
This can be changed via the activeByDefault property.
activeByDefault
Default: falseBooleanLimiting Data Changes
Another useful property is showDataChange, which lets you specify which data changes appear in the monitor.
Hint
This is useful when you want to display changes only in certain columns, or user edits but not ticking data changes
showDataChange
showDataChangeinadaptableOptions.tsexcludes:- ticking data changes (only direct user edits are shown)
- user edits on
updated_atorlanguage
- Click Show on the Data Change History toolbar to open the Data Changes Monitor
- Edit
updated_atorlanguageand note the edit does not appear in the log
Show All Data Changes
By default only the last change for each cell is displayed in the Data Change History Monitor.
If this behaviour is not wanted, then set the showLastDataChangeOnly property to false in order to see every change for each cell.
showLastDataChangeOnly
Default: trueBooleanshowLastDataChangeOnly: falseinadaptableOptions.tskeeps every change per cell in the logonAdaptableReady.tsupdatesgithub_starson the first row three times; open the monitor to see three entries
- Open the Data Change History monitor after the scripted updates and confirm three changes for the same cell
Limiting Data Changes in Store
By default AdapTable retains every logged data change in State indefinitely.
This is fine if you are tracking user edits, but the store can grow unboundedly when tracking ticking data.
Use the maxDataChangesInStore property to cap the number of changes held in memory at any one time.
Hint
- When the cap is reached, the oldest change is dropped as each new change is logged
- This ensures that the store never exceeds the size you configure
maxDataChangesInStore
Default: undefinedNumbermaxDataChangesInStore: 8andshowLastDataChangeOnly: falseinadaptableOptions.ts; ticking is driven fromonAdaptableReady.ts- Each tick updates a random row/column among
github_stars,github_watchers,open_issues_count, orupdated_at - The monitor opens automatically; once eight entries exist, each new change drops the oldest
- Watch the Data Change History monitor as ticking updates arrive
- The list fills to eight entries and then holds steady — each new change pushes the oldest one out