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

React Combobox v2 type definitions don't support "by" prop in uncontrolled usage #3636

Open
silvenon opened this issue Feb 7, 2025 · 0 comments

Comments

@silvenon
Copy link
Contributor

silvenon commented Feb 7, 2025

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.2.0

What browser are you using?

N/A

Reproduction URL

https://stackblitz.com/edit/vitejs-vite-7mbtsold?file=src%2FApp.tsx

Describe your issue

In the Combobox React component the by prop is only permitted by TypeScript definitions if value is also provided, which doesn't allow for the uncontrolled usage. This was possible in v1, I'm not sure if by mistake or not.

Considering that onChange is a prop that will be most likely used on Combobox, how about removing NoInfer from the argument of that function?

@silvenon silvenon changed the title React Combobox v2 type definitions don't support uncontrolled usage for "by" prop React Combobox v2 type definitions don't support "by" prop in uncontrolled usage Feb 7, 2025
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

No branches or pull requests

1 participant