You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
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 theby
prop is only permitted by TypeScript definitions ifvalue
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 onCombobox
, how about removingNoInfer
from the argument of that function?The text was updated successfully, but these errors were encountered: