[feature] custom onSave implementation
See original GitHub issueHey!
Is there a way to define custom callback when data is saved/updated?
Consider a situation when a collection or document are read-only, write operations can be only done server-side.
read: true;
write: false;
onSaveSuccess
and onPreSave
are hooks around client-side save operation.
For example, custom save operation would let us perform calls to an API to update data.
Something like this defined on Schema maybe?
onSave = async ({ newValues }) => {
await updateData(...)
// if throws - display snackbar
return newValues;
};
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Understand SharePoint forms integration - Power Apps
Customize the default form Here are some things to keep in mind when you customize forms: Use the OnSave formula of the SharePointIntegration ......
Read more >PowerApps: How to Customize "Save" and "Cancel" Buttons
Add "Save" and "Cancel" Buttons to SharePoint Online List Forms. Click "Customize" either from an item form or the list command bar to...
Read more >How to Correctly Save the State of a Custom View in Android
I just pass the super state and set childrenStates using the saveChildViewStates extension function.
Read more >Async OnSave handlers in DataVerse/ Dynamics 365 forms to ...
With onsave event handlers, the following requirements frequently come up. Cancel save event of form in based on custom validations from server side....
Read more >What's "Onchange", "Onsave" and "Onload" in CRM
These are a few of the events you can tie your custom code into. OnChange - the event when a field value changes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Quick update in case someone is interested. We are currently working on a way to override the complete datasource implementation, allowing you to add your custom logic and even replace the whole Firestore implementation for a different one.
Thanks for letting me know! Gonna keep an eye on this 😃