TinyBase logoTinyBase

RowListener

The RowListener type describes a function that is used to listen to changes to a Row.

(
  store: Store,
  tableId: Id,
  rowId: Id,
  getCellChange: GetCellChange | undefined,
): void
TypeDescription
storeStore

A reference to the Store that changed.

tableIdId

The Id of the Table that changed.

rowIdId

The Id of the Row that changed.

getCellChangeGetCellChange | undefined

A function that returns information about any Cell's changes.

returnsvoid

This has no return value.

A RowListener is provided when using the addRowListener method. See that method for specific examples.

When called, a RowListener is given a reference to the Store, the Id of the Table that changed, the Id of the Row that changed, 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.