Replies: 1 comment
-
|
Yeah, the To make it more complete, I usually also include a Another idea could be to introduce dedicated events for each action type (like What do you think? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently
collection.on('validate', (item) => {})performs a get and merge before passing the item to the validate callback. It would be beneficial to be able to validate the update prior to the merge. I have different schemas for create, read, update, for example the case of a updated_at column in a db. I want to validate before pushing to the remote server where it will fail.Change callback signature to include the
type: 'insert' | 'update' | 'replace'and the raw item which could be in the second arg of the callback{ raw: modify({}, modifier) or item.Use another earlier event.
Beta Was this translation helpful? Give feedback.
All reactions