-
-
Notifications
You must be signed in to change notification settings - Fork 493
Use parse instead of format when calculating checked #974
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
Use parse instead of format when calculating checked #974
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9839445:
|
@nkappler
nkappler
Apr 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value should probably be const as you can call parse right here, then you could remove line 164 and change 171 to `return value === _value"
nkappler
commented
Apr 14, 2022
I'm not a maintainer, just interested in this PR as I stumbled upon it due to this bug #560
This may be an incorrect assumption, but it seems like the getter for
checkedshould be usingparse, notformatwhen comparing values. In addition to fixing an issue I was experiencing, the TypeScript definitions suggest this should be the intended behavior as well asparsereturnsFieldValueandstate.configis of the typeFieldValue.I added a couple of tests to prevent future regressions – please let me know if there's anything else I should do to get this to a state where you'd be comfortable accepting the patch.
Thanks for the great library!