Computed Columns with Declared Dependencies
Computed columns can declare which fields or columns they depend on, so a change to a dependency refreshes only the affected computed cells automatically. Developers no longer need to hand-roll refresh calls for derived values.
Planned. This page shows the specification from issue #179. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Invoice lines with qty, price, Subtotal (dependsOn qty, price), Tax (dependsOn Subtotal) and Total (dependsOn Subtotal, Tax).
Expected behavior
Editing qty triggers a chained recomputation of Subtotal, then Tax, then Total in the same row only. With declarations off, the computed cells go stale until a manual refresh.
Planned API surface
columnDef.valueGettercolumnDef.dependsOn (field or colId list)onCellValueChangedAcceptance criteria
- Dependency changes refresh only the dependent cells in the same row (pending)
- Transitive dependencies are resolved in topological order (pending)
- A cycle in dependsOn is detected at definition time with a clear error (pending)
- Each dependency is evaluated once per change, with no duplicate getter calls (pending)