TinyBase logoTinyBase β

useHasTableCellListener

The useHasTableCellListener hook registers a listener that is called whenever a specified Cell Id is added to or removed from across a Table.

useHasTableCellListener(
  tableId: MaybeGetter<IdOrNull>,
  cellId: MaybeGetter<IdOrNull>,
  listener: HasTableCellListener,
  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.

cellIdMaybeGetter<IdOrNull>

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

listenerHasTableCellListener

The function to call when the Cell Id 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