The Data Change History Module provides information about all cell value changes in your AdapTable session - both user edits and 'ticking' data changes.
Change History Modes
There are 3 modes for Data Tracking
Active: Data Changes are tracked
This is not the default option - tracking needs to be explicitly turned on
Tracking can be auto-activated by setting
activeByDefaultto true in Data Change History Options
Inactive: Changes are not tracked and previous changes are flushed from cache
Suspended: Changes are not tracked (but previous change history still displays)
The Module includes the following UI Elements:
- Popup - displays a table showing all changes to any cell value in the current session. Each row also has an 'Edit' button which will revert the change.
- Toolbar - Can activate, de-activate or suspend listening to data changes
- Tool Panel - Same as Toolbar above.
The ReadOnly Entitlement behaviour is that the table will display but the 'Edit' button is disabled.
There is no Predefined Config available for the Change History Module
Data Change History Options
The Data Change History Options allow you to set when Data Changes are tracked:
|activeByDefault||Whether data change history should be active by default; it may be changed at runtime via the UI controls||false|
|filterDataChange||Function enabling specific data changes to be included/excluded from the Data Change History||undefined (all data changes are logged)|
filterDataChange property is useful as it allows you to monitor only some changes.
For instance to monitor only user edits (and not 'ticking' data changes) you can do:
Data Change History API
The Data Change History API includes these functions
|activateDataChangeHistory(forceReset)||Activates Data Change History tracking (or resumes it, if it is currently suspended)|
|deactivateDataChangeHistory()||Deactivates Data Change History tracking and flushes the cache|
|getDataChangeHistoryLog()||Retrieves all data changes which are currently available|
|getDataChangeHistoryMode()||Retrieves current Data Change History mode: 'ACTIVE', 'INACTIVE', 'SUSPENDED'|
|suspendDataChangeHistory()||Suspends data change history tracking|
|undoDataChangeHistoryEntry(dataChangeInfo)||Reverts the provided data change to its previous value|
Can I see other information in the Change History Module other than cell changes?
Not at the moment, but that might be added in due course.
In the meantime you can subscribe to the Adaptable State Changed Event for full oversight of all activity in AdapTable.