Skip to main content
Version: 3.0.0-beta

Function: saveEntityWithCallbacks()

saveEntityWithCallbacks<M, USER>(__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 collection. 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).

Type Parameters​

• M extends Record<string, any>

• USER extends User

Parameters​

• __namedParameters: SaveEntityProps<M> & object & object

Returns​

Promise<void>

See​

useDataSource

Defined in​

packages/firecms_core/src/hooks/data/save.ts:51

Sign up to our newsletter to get the latest news and updates. No spam!