WarUI

Dirty Indicators and Change Tracking

GRID-A14-F18P0baselinePlanned

Marks edited cells and rows that have not been saved, and exposes an API to list, revert or accept the changes. Users need to see what they changed before saving.

Planned. This page shows the specification from issue #193. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

An editable budget grid with change tracking turned on.

Expected behavior

Edited cells show the indicator. Editing a value back to its original removes the dirty state. The JSON panel lists the original and current values. Accepting the changes clears the markers and keeps the new values.

Planned API surface

trackChangesdirtyIndicator: 'corner'|'background'|'none'getChanges()isDirty(rowId?, colId?)revertCell()revertRow()revertAll()acceptChanges()onDirtyStateChanged

Acceptance criteria

  • A cell is dirty only when its current value differs from its original value (deep equality for arrays and objects). (pending)
  • revertCell restores the original value and fires onCellValueChanged. (pending)
  • getChanges returns rowId, field, oldValue and newValue for each change. (pending)
  • The dirty state survives sorting, filtering and virtualization. (pending)