CellListener
The CellListener
type describes a function that is used to listen to changes to a Cell
.
(
store: Store,
tableId: Id,
rowId: Id,
cellId: Id,
newCell: Cell,
oldCell: Cell,
getCellChange: GetCellChange | undefined,
): void
Type | Description | |
---|---|---|
store | Store | A reference to the |
tableId | Id | |
rowId | Id | |
cellId | Id | |
newCell | Cell | The new value of the |
oldCell | Cell | The old value of the |
getCellChange | GetCellChange | undefined | A function that returns information about any |
returns | void | This has no return value. |
A CellListener
is provided when using the addCellListener
method. See that method for specific examples.
When called, a CellListener
is given a reference to the Store
, the Id
of the Table
that changed, the Id
of the Row
that changed, and the Id
of Cell
that changed. It is also given the new value of the Cell
, the old value of the Cell
, and a GetCellChange
function that can be used to query Cell
values before and after the current transaction.
Note that if the listener was manually forced to be called (with the callListener
method rather than due to a real change in the Store
), the GetCellChange
function will not be present and the new and old values of the Cell
will be the same.
Since
v1.0.0