TinyBase logoTinyBase β

WillDelCellCallback

The WillDelCellCallback type describes a function that is called before a Cell is deleted from the Store.

(
  tableId: Id,
  rowId: Id,
  cellId: Id,
): boolean
TypeDescription
tableIdId

The Id of the Table containing the Cell.

rowIdId

The Id of the Row containing the Cell.

cellIdId

The Id of the Cell being deleted.

returnsboolean

true to allow the deletion, false to prevent it.

The callback receives the table Id, row Id, and cell Id of the Cell about to be deleted. It returns true to allow the deletion, or false to prevent it.

Multiple WillDelCellCallback functions can be registered and they will be called sequentially. If any callback returns false, the chain short-circuits and the Cell will not be deleted.

Since

v8.0.0