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