From 767784a79cfbbd43eb2efffcadba33d79784af54 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Mon, 13 Sep 2021 16:29:42 +0530 Subject: [PATCH] Added onKeyDown prop to Input comp --- src/app/atoms/input/Input.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/atoms/input/Input.jsx b/src/app/atoms/input/Input.jsx index c5401a3f..7b5f0967 100644 --- a/src/app/atoms/input/Input.jsx +++ b/src/app/atoms/input/Input.jsx @@ -8,6 +8,7 @@ function Input({ id, label, value, placeholder, required, type, onChange, forwardRef, resizable, minHeight, onResize, state, + onKeyDown, }) { return (
@@ -26,6 +27,7 @@ function Input({ autoComplete="off" onChange={onChange} onResize={onResize} + onKeyDown={onKeyDown} /> ) : ( )}
@@ -57,6 +60,7 @@ Input.defaultProps = { minHeight: 46, onResize: null, state: 'normal', + onKeyDown: null, }; Input.propTypes = { @@ -72,6 +76,7 @@ Input.propTypes = { minHeight: PropTypes.number, onResize: PropTypes.func, state: PropTypes.oneOf(['normal', 'success', 'error']), + onKeyDown: PropTypes.func, }; export default Input;