deleteEntityWithCallbacks
@firecms/core / deleteEntityWithCallbacks
Function: deleteEntityWithCallbacks()
Section titled “Function: deleteEntityWithCallbacks()”deleteEntityWithCallbacks<
M,USER>(dataSource):Promise<boolean>
Defined in: hooks/data/delete.ts:46
This function is in charge of deleting an entity in the datasource. It will run all the delete callbacks specified in the collection. It is also possible to attach callbacks on save success or error, and callback errors.
If you just want to delete any data without running the onPreDelete,
and onDelete callbacks, you can use the deleteEntity method
in the datasource (useDataSource).
Type Parameters
Section titled “Type Parameters”M extends Record<string, any>
USER extends User
Parameters
Section titled “Parameters”dataSource
Section titled “dataSource”DeleteEntityProps<M> & object & object
Returns
Section titled “Returns”Promise<boolean>