-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: error when input type is checkbox #8048
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8048 +/- ##
=======================================
Coverage 75.42% 75.42%
=======================================
Files 215 215
Lines 13548 13548
Branches 2673 2673
=======================================
Hits 10218 10218
Misses 3127 3127
Partials 203 203
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## main #8048 +/- ##
=======================================
Coverage 78.02% 78.02%
=======================================
Files 250 250
Lines 18109 18109
Branches 3882 3882
=======================================
Hits 14129 14129
Misses 3850 3850
Partials 130 130
Continue to review full report at Codecov.
|
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.
Thank you for your contribution. I am getting this merged in.
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Description of changes
Extending the SignUp class to implement a custom sign up field like the following:
Ends with the following error when clicking signup:
That seems to be because the checkbox value is a
true
boolean that cannot be converted to a string. With this change instead of leaving JS to make that cast to a string, we force it so in the case of atrue
boolean"true"
as a string will be set.Issue #, if available
Description of how you validated changes
I validated the changes manually and the issue with the boolean values dissapeared.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.