From: Ajay Bura Date: Mon, 13 Sep 2021 10:59:42 +0000 (+0530) Subject: Added onKeyDown prop to Input comp X-Git-Tag: v1.3.0^2~10 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=767784a79cfbbd43eb2efffcadba33d79784af54;p=cinny.git Added onKeyDown prop to Input comp --- diff --git a/src/app/atoms/input/Input.jsx b/src/app/atoms/input/Input.jsx index c5401a3..7b5f096 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;