-
Abit new to the commerce tools and haven't seen and keypress/keydown events included in the text-input props. Just wondering whether I can implement such a functionality if for example I want to search on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @myrdstom Adding support for you can go ahead and add (optional) where we simply forward the handler from the client with no proxy functionality onKeyDown={props.onKeyDown} |
Beta Was this translation helpful? Give feedback.
Hello @myrdstom
thanks for your question.
Adding support for
onKeyDown
ontext-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