New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify parse={null}
behavior on the form level
#384
Comments
Anyway it would be nice to have empty strings or null values in the values object. So you could do a patch or a spread to an existing object and it would overwrite the fields correctly. |
this is the most important feature missing in final-form. I would create two options:
It is causing a lot of issues currently when working with graphql. |
Wow, this discovered this bug in my app. It's totally NOT expected that |
@zsolt-dev Hi there, did you figure out any way to parse untouched fields? |
Why does react-final-form add a default parse behaviour of converting empty string to final-form itself doesn't do that, so I don't follow why the React wrapper is adding this extra parsing logic. (Like @flybayer, this was totally unexpected, and has just led to a hard-to-find bug being raised in the app I'm working on.) |
When creating a form to edit an existing object the empty-to-undefined conversion is problematic for optional fields that can be cleared by the user. Having to specify
parse={null}
in every field is rather annoying and not DRY - also, it's easy to forget.It would be nice if there was an option to set this behavior on the
<FinalForm>
itself.The text was updated successfully, but these errors were encountered: