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

Support onKeyDown in Input #884

Closed
cattermo opened this issue Nov 17, 2016 · 6 comments · Fixed by #886
Closed

Support onKeyDown in Input #884

cattermo opened this issue Nov 17, 2016 · 6 comments · Fixed by #886
Labels

Comments

@cattermo
Copy link

To be able to allow/disallow different keys in input fields it would be nice if the Input component would have an onKeyDown prop where I could provide my custom event handler. If I call e.preventDefault() in the onKeyDown event handler the onChange handler would not be called.

This might be as easy as to add the onKeyDown into htmlInputPropNames array?

Version

0.60.9

@levithomason
Copy link
Member

You're correct, I've added #886 to address this. I also tested it in the browser to ensure it works as expected.

@levithomason
Copy link
Member

Released in semantic-ui-react@0.61.1.

@danydhondt
Copy link

The onKeyDown property should be added to the documentation. Great feature!

@guillemcanal
Copy link

@levithomason I may be wrong, but it don't seems to be supported anymore.

@svey
Copy link

svey commented Sep 5, 2019

why was this removed?

@layershifter
Copy link
Member

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 a pull request may close this issue.

6 participants