Skip to content

saveEntityWithCallbacks

@firecms/core


@firecms/core / saveEntityWithCallbacks

saveEntityWithCallbacks<M, USER>(collection): Promise<void>

Defined in: hooks/data/save.ts:43

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).

M extends Record<string, any>

USER extends User

SaveEntityProps<M> & object & object

Promise<void>

useDataSource