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