Volatile functions and recalculation triggers
Volatile functions such as NOW, RAND, RANDBETWEEN, INDIRECT and custom functions marked volatile are recalculated on every pass or on a configurable timer. Developers can also suspend recalculation for batch updates and then resume it.
Planned. This page shows the specification from issue #192. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A grid with NOW() and RAND() cells and a bulk import button.
Expected behavior
Volatile cells tick at the chosen interval. In manual mode, edits mark cells as stale with a visual indicator until 'Recalculate' is pressed. A batched import triggers a single recalculation pass.
Planned API surface
option: formulas.volatileIntervalmethod: formulaEngine.suspend()method: formulaEngine.resume()method: api.batchUpdate(fn)option: formulas.calculationMode ('auto'|'manual')Acceptance criteria
- A batchUpdate wrapping N edits produces exactly one recalculated event. (pending)
- Manual mode marks dependent cells as stale, and recalculate() clears that state. (pending)
- The volatile timer stops when the grid is destroyed or hidden, if pauseWhenHidden is set. (pending)
- Nested suspend and resume calls are reference-counted. (pending)