-
Notifications
You must be signed in to change notification settings - Fork 42
MMT-4038: Fix issue where one input was affecting another on the form #1423
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1423 +/- ##
=======================================
Coverage 98.12% 98.12%
=======================================
Files 425 425
Lines 6838 6838
Branches 1456 1457 +1
=======================================
Hits 6710 6710
Misses 127 127
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| > | ||
| <input | ||
| className="d-flex form-check-input m-2" | ||
| id={`${id}-true`} |
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.
Are the id values duplicates? I'm kind of confused why the name would be used here or contain the id value since the name should be what is on the view/display. If its on the same widget since that's the prop coming from the parent maybe we can append another part to the id value in each of the inputs or pass down a little more information where this gets rendered from
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.
Afaik this is being required by react-json-schema form, otherwise the form itself gets out of sync with the json data.
| className="d-flex form-check-input m-2" | ||
| id={`${id}-true`} | ||
| name="true" | ||
| name={`${id}-true`} |
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.
This can just be name={id}
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.
No, we need to tack on -true to be make it unique.
| className="form-check-input m-2" | ||
| id={`${id}-false`} | ||
| name="false" | ||
| name={`${id}-false`} |
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.
same here
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.
We need to tack on -false to make it unique.
Overview
What is the feature?
In testing, a issue was discovered toggling the radio button when multiple
CustomRadioWidgetwhere renders to a page.What is the Solution?
Each input field needed a unique name.
What areas of the application does this impact?
Services->Service Options
Testing
Go to Services->Service Options
Click on Spatial->Point
Client on Aggregation->Concat Default
Try toggling each of those radio buttons to ensure that changing one doesn't change the other
Checklist