TinyBase logoTinyBase β

useHasCellListener

The useHasCellListener hook registers a listener that is called whenever a specified Cell is added to or removed from a Row.

useHasCellListener(
  tableId: MaybeGetter<IdOrNull>,
  rowId: MaybeGetter<IdOrNull>,
  cellId: MaybeGetter<IdOrNull>,
  listener: HasCellListener,
  mutator?: boolean,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): void
TypeDescription
tableIdMaybeGetter<IdOrNull>

The Id of the Table to listen to, or null to listen to any Table.

rowIdMaybeGetter<IdOrNull>

The Id of the Row to listen to, or null to listen to any Row.

cellIdMaybeGetter<IdOrNull>

The Id of the Cell to listen to, or null to listen to any Cell.

listenerHasCellListener

The function to call when the Cell changes.

mutator?boolean

An optional boolean indicating the listener mutates Store data.

storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store to use, or its Id.

returnsvoid

This has no return value.

Since

v8.1.0