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

Bug - MultiTypeaheadSelect template - toggle keyboard handling doesn't allow customization #11160

Open
kmcfaul opened this issue Nov 4, 2024 · 0 comments
Labels

Comments

@kmcfaul
Copy link
Contributor

kmcfaul commented Nov 4, 2024

Specifically for MultiTypeaheadSelect, but maybe applies to other selects as well. The onKeyDown handler of the text input in the toggle has behavior set for the enter key but doesn't prevent the default behavior, and doesn't allow the user to override that if the menu is closed. If the menu is open, the user can hook into the event via onSelectionChange. We should either have the option of adding additional keyboard handling to this handler, or pass the event through onToggle.

Workaround - pass an onKeyDown handler to the outer menu toggle via toggleProps that has handling for the key (in this case enter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs triage
Development

No branches or pull requests

1 participant