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

Typeahead search jumps back and forth between same items #1090

Closed
LeanderG opened this issue Feb 5, 2022 · 1 comment · Fixed by #1098
Closed

Typeahead search jumps back and forth between same items #1090

LeanderG opened this issue Feb 5, 2022 · 1 comment · Fixed by #1098
Assignees

Comments

@LeanderG
Copy link

LeanderG commented Feb 5, 2022

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

current master branch

What browser are you using?

Chrome, Firefox

Describe your issue

This PR #1051 introduced a bug.

Let's take the example from the PR. We have 4 items in a menu:

  • Alice
  • Bob
  • Charlie
  • Bob

If you type Bob quickly it jumps from the first Bob to the second and back to the first. The expected behavior is that it should keep the first Bob selected. Only if you type b repeatedly slowly should it jump back and forth.

@RobinMalfait RobinMalfait self-assigned this Feb 8, 2022
RobinMalfait added a commit that referenced this issue Feb 8, 2022
* ensure typeahead stays on same item if it still matches

Fixes: #1090

* update changelog
@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

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

You can already try it using:

  • npm install @headlessui/react@insiders or yarn add @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders or yarn add @headlessui/vue@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.

2 participants