Skip to content

Does @commercetools-uikit/text-input support keydown events? #1808

Answered by adnasa
myrdstom asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @myrdstom
thanks for your question.

Adding support for onKeyDown on text-input would be something I welcome a PR on.
However the handler for enter keyCode should be handled on the client-side.

you can go ahead and add (optional) onKeyDown if you want here.
https://github.com/commercetools/ui-kit/blob/master/packages/components/inputs/text-input/src/text-input.js#L43

where we simply forward the handler from the client with no proxy functionality

  onKeyDown={props.onKeyDown}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by emmenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants