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

fix(money-input): add formatting workaround #102

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

dferber90
Copy link
Contributor

There is a bug in Formik which would result in MoneyInput's currency code update being lost when the amount was reformatted because of the currency code change.

The consequence of the bug is that the validation runs with the wrong values in case the change of the currency leads to the amount being reformatted (happens when user enters an unformatted amount before selecting a currency - and then selecting a currency). This leads to the wrong validation errors being shown and the form not being submittable.

We can remove the setTimeout workaround once the PR to Formik is merged: jaredpalmer/formik#939

CodeSandbox: https://codesandbox.io/s/pk7mk0nny0

There is a bug in Formik which would result in MoneyInput's currency code update being lost when the amount was reformatted because of the currency code change.
@dferber90 dferber90 added the 🐛 Type: Bug Something isn't working label Sep 27, 2018
@dferber90 dferber90 requested a review from lufego September 27, 2018 10:00
@dferber90 dferber90 merged commit 344c5d7 into master Sep 27, 2018
@dferber90 dferber90 deleted the df-fix-money-input-formik branch September 27, 2018 12:31
lufego pushed a commit that referenced this pull request Oct 1, 2018
There is a bug in Formik which would result in MoneyInput's currency code update being lost when the amount was reformatted because of the currency code change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants