-
Notifications
You must be signed in to change notification settings - Fork 67
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
[BD-46] fix: fixed duplicate calls in FormRadioSet and FormCheckboxSet #2705
[BD-46] fix: fixed duplicate calls in FormRadioSet and FormCheckboxSet #2705
Conversation
Thanks for the pull request, @PKulkoRaccoonGang! When this pull request is ready, tag your edX technical lead. |
✅ Deploy Preview for paragon-openedx ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2705 +/- ##
==========================================
- Coverage 92.74% 92.74% -0.01%
==========================================
Files 235 235
Lines 4234 4230 -4
Branches 1027 1027
==========================================
- Hits 3927 3923 -4
Misses 303 303
Partials 4 4
☔ View full report in Codecov by Sentry. |
0d64b76
to
230e19b
Compare
@PKulkoRaccoonGang Please add test cases checking that |
@PKulkoRaccoonGang Your solution works, but it does not fix the underlying problem -- I think the simplest solution is to remove const FormRadio = React.forwardRef(({
children,
className,
controlClassName,
labelClassName,
description,
isInvalid,
isValid,
...props
}, ref) => {
return (
<FormGroupContextProvider
controlId={props.id}
isInvalid={isInvalid}
isValid={isValid}
>
<div
className={classNames('pgn__form-radio', className, {
'pgn__form-control-valid': isValid,
'pgn__form-control-invalid': isInvalid,
'pgn__form-control-disabled': props.disabled,
})}
>
<RadioControl ref={ref} className={controlClassName} {...props} />
<div>
<FormLabel className={labelClassName}>
{children}
</FormLabel>
{description && (
<FormControlFeedback hasIcon={false}>
{description}
</FormControlFeedback>
)}
</div>
</div>
</FormGroupContextProvider>
);
}); |
b0752da
to
7bfa1e5
Compare
@PKulkoRaccoonGang 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
🎉 This PR is included in version 21.5.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 22.0.0-alpha.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
onChange
for theForm.RadioSet
andForm.CheckboxSet
components.Issue: #2683
Deploy Preview
Playground demo
Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist