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

fix(useCombobox): initial focus behaviour #1526

Merged
merged 3 commits into from
Aug 2, 2023

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Aug 1, 2023

What:
Fix the initial input focus and open menu value for useCombobox.

Why:
Fixes #1522.

How:
Initially, menu is opened and input is focused based on the isOpen prop, if passed. If not, then initialIsOpen value is considered. Lastly, defaultIsOpen value is considered. If none are passed, it's false.

Basically, this PR aligns the initial input focus with the initial menu open.

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

@silviuaavram silviuaavram merged commit cae0884 into master Aug 2, 2023
2 checks passed
@silviuaavram silviuaavram deleted the fix/initial-use-combobox-focus branch August 2, 2023 07:02
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

🎉 This PR is included in version 8.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus should not be triggered if menu is not opened (WCAG)
1 participant