Skip to main content

Function: deleteEntityWithCallbacks

deleteEntityWithCallbacks<M>(__namedParameters): Promise<boolean>

This function is in charge of deleting an entity in the datasource. It will run all the delete callbacks specified in the schema. It is also possible to attach callbacks on save success or error, and callback errors.

If you just want to delete the data without running the onPreDelete, and onDelete callbacks, you can use the deleteEntity method in the datasource (useDataSource).

Type parameters#

Name
M

Parameters#

NameType
__namedParametersDeleteEntityWithCallbacksProps<M> & { context: FireCMSContext ; dataSource: DataSource }

Returns#

Promise<boolean>

Defined in#

hooks/data/delete.ts:41