WillSetCellCallback
The WillSetCellCallback type describes a function that is called before a Cell is set in the Store.
(
tableId: Id,
rowId: Id,
cellId: Id,
cell: Cell,
): CellOrUndefined| Type | Description | |
|---|---|---|
tableId | Id | |
rowId | Id | |
cellId | Id | |
cell | Cell | The |
| returns | CellOrUndefined | The |
The callback receives the table Id, row Id, cell Id, and the Cell value that is about to be set. It can return the Cell value (possibly transformed) to allow the write, or undefined to prevent the Cell from being set.
Multiple WillSetCellCallback functions can be registered and they will be called sequentially, the Cell value being updated successively. If any callback returns undefined, the chain short-circuits and the Cell will not be set.
Since
v8.0.0