Configuring Data Change History

Summary

  • Set how Data Change History works and what is tracked

Data Change History is configured in the Data Change History Options section of Adaptable Options.

It includes all the properties required to set up tracking changes to meet your requirements.

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: false
Boolean
Whether Data Change history should be Active by default

Limiting Data Changes

Another useful property is showDataChange which allows you to specify which data changes to monitor.

Hint

This is useful when want to display changes only in certain columns or user edits and not ticking data changes

showDataChange

Function which specifies which Data Changes should be displayed in Data Changes Monitor
Data Change History: Limiting Changes
Fork
  • In this example we have provided an implementation for the showDataChange function
  • It is configured so that the Data Changes Monitor will exclude:
    • ticking data changes (i.e. just direct data edits are displayed)
    • data edits for the Updated or Language columns

See the configured Data Change History Options properties

Try It Out
  • Click the Configure button in the Data Change History Toolbar to open the Data Changes Monitor
  • Edit the Updated or Language column in the grid and note that the edit does not appear in the History Log
Loading demo…

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: true
Boolean
Whether to show all changes for each cell or just the last one
Data Change History: Showing all Changes
Fork
  • In this example we show all changes for Cells by setting showLastDataChangeOnly to true
  • We update Github Stars in first row 3 times and then open the Data Change History Monitor to see all the changes
Loading demo…

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: undefined
Number
Maximum number of Data Changes to retain in State; oldest changes are removed once the limit is reached
Data Change History: Capping Store Size
Fork
  • In this example we set maxDataChangesInStore to 8 and drive continuous ticking updates
  • Each tick picks a random row and a random column (Github Stars, Github Watchers, Open Issues Count or Updated At) so log entries are visibly varied
  • The Data Change History Monitor opens automatically so you can watch entries accumulate
  • Once 8 entries are in the log, each new tick causes the oldest entry to drop off — the log never grows past 8 (leaving visible empty space underneath)

See the configured Data Change History Options properties

Try It Out
  • Watch the Data Change History Monitor as ticking updates arrive
  • The list fills up to 8 entries and then holds steady — each new change pushes the oldest one out
Loading demo…