Skip to content
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

Ensure DOM ref is properly handled in the RadioGroup component #2424

Merged
merged 4 commits into from
Apr 11, 2023

Conversation

RobinMalfait
Copy link
Member

This PR fixes an issue where the RadioGroup component didn't handle the ref correctly if you
were using a custom component using the as prop.

Small aside: dropped the by prop that leaked into the DOM.

Fixes: #2423

Otherwise it ends up in the DOM which doesn't hurt but isn't ideal
either.
We assumed that the `optionRef` was `HTMLElement | null`, but if you use
a custom component, then it is exposed as `{ $el: ref }`, this is why we
use the `dom()` helper.
@vercel
Copy link

vercel bot commented Apr 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2023 2:56pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2023 2:56pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant