Skip to content
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

Add emptyAsUndefined and possibly emptyAsNull props to form fields #4353

Closed
Tobbe opened this issue Feb 2, 2022 · 0 comments · Fixed by #4460
Closed

Add emptyAsUndefined and possibly emptyAsNull props to form fields #4353

Tobbe opened this issue Feb 2, 2022 · 0 comments · Fixed by #4460

Comments

@Tobbe
Copy link
Member

Tobbe commented Feb 2, 2022

Optional form fields whose name ends in Id are treated as DB field relation input fields and when they're empty we automatically convert '' to undefined. We want it to be possible to override this behavior by setting emptyAsUndefined={false} and also to get this behavior on other fields, whose name don't end with Id, by setting emptyAsUndefined={true}

Also, because null is somewhat of a special value for DBs it might make sense to add emptyAsNull as another option.

For more context:
PR: #4302
Issue: #4297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant