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

[Feature]: Custom handling for enter key in ComboboxInput #1576

Open
2 tasks done
abh1nash opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks done

[Feature]: Custom handling for enter key in ComboboxInput #1576

abh1nash opened this issue Jan 23, 2025 · 0 comments

Comments

@abh1nash
Copy link
Contributor

Describe the feature

By default, pressing enter on the ComboboxInput element triggers a click on the selected item. While this might be what is desired in a lot of cases, its not ideal because:

  1. it removes any native event data - the event comes through as a click event even when user pressed enter
  2. in some cases, such as a search box with suggestions, this is not ideal as the enter key should trigger a search with user's query instead of selecting the first result of the suggestion

To alleviate this, inputEnterFunction could be provided to the ComboboxRoot element, which will perform custom action on pressing enter.

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
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

No branches or pull requests

1 participant