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
Changing the immediate prop on the Combobox does not immediately reflect behavior change. If the component is initiated with immediate={false}, and then its prop value changes to true then it will still not show the options on focus, until something is typed in. Afterwards, the component behaves correctly (e.g. if the input is cleared and the focus is released, next time the component receives focus it will correctly show the options).
Only reproducible in React 18.2. Updating the immediate prop seems to work correctly in React 19.
In the attached example the component should behave with the behavior of immediate={true} (as it's set to true in the first useEffect cycle), but instead it behaves as if immediate was set to false, until something is typed in.
The text was updated successfully, but these errors were encountered:
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
2.2.0
What browser are you using?
Chrome
Reproduction URL
https://codesandbox.io/p/sandbox/rvmjcv
Describe your issue
Changing the
immediate
prop on the Combobox does not immediately reflect behavior change. If the component is initiated withimmediate={false}
, and then its prop value changes totrue
then it will still not show the options on focus, until something is typed in. Afterwards, the component behaves correctly (e.g. if the input is cleared and the focus is released, next time the component receives focus it will correctly show the options).Only reproducible in React 18.2. Updating the
immediate
prop seems to work correctly in React 19.In the attached example the component should behave with the behavior of
immediate={true}
(as it's set totrue
in the firstuseEffect
cycle), but instead it behaves as ifimmediate
was set to false, until something is typed in.The text was updated successfully, but these errors were encountered: