Skip to content

unexpected undefined using combobox #3583

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

Closed
intersoom opened this issue Nov 30, 2024 · 2 comments · Fixed by #3678
Closed

unexpected undefined using combobox #3583

intersoom opened this issue Nov 30, 2024 · 2 comments · Fixed by #3678

Comments

@intersoom
Copy link

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?
Chrome

Reproduction URL
https://codesandbox.io/p/devbox/still-leftpad-xr4zpk?embed=1

Steps to reproduce:

  1. click the field
  2. clear the input (type "a")
  3. press enter
  4. error happens

this is same url as in #3353

Describe your issue
스크린샷 2024-11-30 오후 5 12 04

It is told that this issue is resolved in version 2.1.2 but it is still being reproduced when I return empty array to the virtual options.

@Emnalyeriar
Copy link

I have the same issue, I didn't find a solution but I have a workaround. If the filtered options are an empty array, I return a disabled dummy option with the text "No results found".

@RobinMalfait
Copy link
Member

Hey!

This should be fixed by #3678, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.

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 a pull request may close this issue.

3 participants