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

Enter key handler for Search? #3903

Closed
dw-ll opened this issue Feb 27, 2020 · 3 comments
Closed

Enter key handler for Search? #3903

dw-ll opened this issue Feb 27, 2020 · 3 comments

Comments

@dw-ll
Copy link

dw-ll commented Feb 27, 2020

Is there a feature/prop that handles or triggers handleResultSelect with the current input value for the Search module when the enter/return key is pressed? I dove into the code and found selectItemOnEnter and could not figure out how to utilize it.

@welcome
Copy link

welcome bot commented Feb 27, 2020

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@brianespinosa
Copy link
Member

I believe this is a duplicate of #3994 which should be resolved by a recently merged PR.

@SiOuz
Copy link

SiOuz commented Mar 6, 2021

Its not on official documentation, but you can do that (you inherit it from base component) :
Works fine for me, with typescript.

  onKeyPress={(event: React.KeyboardEvent) => {
    console.log(event.key);
  }}

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

No branches or pull requests

3 participants