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

Can not set parse or format to null with Flow #400

Closed
11bit opened this issue Dec 19, 2018 · 2 comments · Fixed by #496
Closed

Can not set parse or format to null with Flow #400

11bit opened this issue Dec 19, 2018 · 2 comments · Fixed by #496

Comments

@11bit
Copy link

11bit commented Dec 19, 2018

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

Flow gives an error for form fields with parse or format set to null
Cannot create Field element because: • null [1] is incompatible with function type [2] in property parse.

What is the expected behavior?

No errors

What's your environment?

"react-final-form": "4.0.2",
"final-form": "4.11.0",
"flow-bin": "0.84",

Other information

Probably the fix is to slightly change type defs (it works in my project, but it has only one form so I am not sure about possible? side effects)

  format?: ((value: any, name: string) => any) | null,
  parse?: ((value: any, name: string) => any) | null,
@erikras
Copy link
Member

erikras commented May 27, 2019

Published fix in v6.0.0.

@lock
Copy link

lock bot commented Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants