Interface DerivedValuesChangeIf

What changed when the table calls AreaModelIf.invalidateDerivedValues after an edit or TableApi.updateCells: the area and the displayed rows. A model may use it to recompute only what depends on these rows (a row grouping recomputes the path of the changed row only). Without it everything may have changed.

Example

class MyModel extends AreaModel {
private readonly dirtyRows = new Set<number>();
private allDirty = true;

invalidateDerivedValues(change?: DerivedValuesChangeIf): void {
if (change?.area === "body") {
change.rowIndices.forEach(r => this.dirtyRows.add(r)); // only these rows
} else {
this.allDirty = true; // anything may have changed
}
}
}

Since

1.1.94

Hierarchy

  • DerivedValuesChangeIf

Properties

Properties

area: AreaIdent

The area whose values changed.

rowIndices: number[]

The changed rows (indices of the displayed rows at the time of the change).