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

Ensure typeahead stays on same item if it still matches #1098

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

RobinMalfait
Copy link
Member

This PR ensures that if you have multiple items like:

  • Alice
  • Bob
  • Charlie
  • Bob

And you type b, then it should jump to the first bob, when you wait a bit and type b again, then we should go to the second bob, so far so good.
The issue is if you type bob or to be clear b, o, b, then it will jump to the first bob for b, to the second bob for o and to the first bob again for b.

This PR fixes that by making sure that you stay on the same bob while you are searching. Once the search time is over, then we will continue from that point onwards.

Fixes: #1090

@vercel
Copy link

vercel bot commented Feb 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/playground-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/E2TFLXJZVKqhxwBsSrBZ1qUfgomo
✅ Preview: https://headlessui-react-git-fix-typeahead-jump-tailwindlabs.vercel.app

headlessui-vue – ./packages/playground-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/2AAKfZ4XnHR52Phm5RU9B4Ghkejd
✅ Preview: https://headlessui-vue-git-fix-typeahead-jump-tailwindlabs.vercel.app

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 this pull request may close these issues.

Typeahead search jumps back and forth between same items
1 participant