-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
setFocus isn't working for RadioButtonGroup and custom errors are breaking focus functionality #266
Comments
the codesandbox is not viewable |
I updated the link ;) |
Also I have updated the example because I found new error. When you are filling the form => you submit it and validate data. If you set some custom errors in validation proces you cant set focus on checkbox BUT if you trigger error by just checking required checkbox and unchecking it OR by onClick with setError you can set focus 🤔 It looks like setting custom erros is breaking smth |
@AdamZajler what do you expect on a RadioGroup to be focused? I don't see any example of @mui which is addressing this. I tried to programmatically use ref.current.focus() but this just doesn't do anything on the RadioGroup of @mui, this might be just not implemented on their side? |
Huh you're right, I didn't think about it that way 😅 But what about this case for the checkbox after form submitting? |
@sadik-malik you introduced the |
@AdamZajler, regarding the checkbox focus functionality: The checkbox receives focus when you click the "agreement focus" button after submitting the form, but without the ripple effect. Try pressing the "space" bar on your keyboard after clicking the "agreement focus" button to see the focus. The only issue is the missing ripple effect, which was raised a while ago in MUI #9659. You can use the |
Duplicates
Latest version
Current behavior 😯
Currently
control.setFocus()
cannot be used; on theRadioButtonGroup
.Expected behavior 🤔
Focus on this element can be setted
Steps to reproduce 🕹
codesandbox
Form to embed
The text was updated successfully, but these errors were encountered: