Skip to main content

Function: saveEntityWithCallbacks

saveEntityWithCallbacks<M>(__namedParameters): Promise<void>

This function is in charge of saving an entity to the datasource. It will run all the save 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 save the data without running the onSaveSuccess, onSaveFailure and onPreSave callbacks, you can use the saveEntity method in the datasource (useDataSource).

see useDataSource

see useSaveEntity

Type parameters#

Name
M

Parameters#

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

Returns#

Promise<void>

Defined in#

hooks/data/useSaveEntity.ts:102