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 we reset the activeOptionIndex if the active option is unmounted #2274

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

RobinMalfait
Copy link
Collaborator

This PR fixes an issue where unmounting the active Combobox.Option results in strange keyboard behaviour.

Unmounting of the active option can happen when you are in a multi-select Combobox, and you filter out all the selected values. This means that the moment you press "Enter" on an active item, it becomes the selected item and therefore will be filtered out.

Fixes: #2269

@vercel
Copy link

vercel bot commented Feb 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 10, 2023 at 6:52PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 10, 2023 at 6:52PM (UTC)

…nted

Unmounting of the active option can happen when you are in a
multi-select Combobox, and you filter out all the selected values. This
means that the moment you press "Enter" on an active item, it becomes
the selected item and therefore will be filtered out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant