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

Omit nullable prop from Combobox component #3100

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Apr 14, 2024

We deprecated the nullable prop because this is now the default behavior. However, we didn't delete the prop from the incoming props. This means that the nullable prop will end up in the underlying DOM node, or worse the Fragment (default tag) and error.

This PR fixes that by eating the nullable prop so that it never ends up on the underlying DOM node or Fragment.

Copy link

vercel bot commented Apr 14, 2024

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 15, 2024 4:11pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2024 4:11pm

@thecrypticace
Copy link
Contributor

I kinda feel like we should have a test for this — thoughts? I know it's a minor thing but seems reasonable to me.

Base automatically changed from fix/explicit-combobox-type to main April 15, 2024 15:43
This should help improve migrating to v2 because otherwise the
`nullable` prop (that doesn't do anything) could end up on the
`Fragment` and cause errors.
@RobinMalfait RobinMalfait force-pushed the fix/drop-combobox-nullable-prop branch from 1e6c815 to 74cea0e Compare April 15, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants