Replies: 1 comment
-
Hey @allannnc — your workaround of passing an empty string to the This is a new feature and we will add it to our roadmap for sure. Thanks for bringing this up! |
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
-
Link to reproduction
?
To Reproduce
Passing
undefined
code
remains the same within the DB (here I'm assuming Payload doesn't know that thedata.code
key was passed intentionally)Passing
null
null
is not allowed by the TS definitionsThe current workaround is to pass an "empty" but not properly cleared value
Suggestions
I think usage of the
in
operator orhasOwnProperty
could help here to allow passingundefined
... BUT this would be a breaking change destroying many peoples' data. So perhapspayload.update
'sdata
arg needs to extend thegenerated-types
and allow a magic value to clear the field?Such as
Describe the Bug
As far as I know, there is no way to properly clear or delete a field using the local API
Payload Version
1.10.1
Beta Was this translation helpful? Give feedback.
All reactions