diff --git a/src/atoms/dataEntry/Input/Input.js b/src/atoms/dataEntry/Input/Input.js index 9cbb43ae..de922792 100644 --- a/src/atoms/dataEntry/Input/Input.js +++ b/src/atoms/dataEntry/Input/Input.js @@ -79,6 +79,8 @@ class Input extends PureComponent { hideErrorIndicator, leftIcon, mask, + onBlur, + onFocus, placeholder, rightIcon, square, @@ -95,7 +97,9 @@ class Input extends PureComponent { hasError, hasLeftIcon, hasRightIcon, + onBlur, onChange: this.onChange, + onFocus, placeholder, square, type, diff --git a/src/atoms/dataEntry/InputField/InputField.js b/src/atoms/dataEntry/InputField/InputField.js index 3c6338f4..4af70943 100644 --- a/src/atoms/dataEntry/InputField/InputField.js +++ b/src/atoms/dataEntry/InputField/InputField.js @@ -50,9 +50,11 @@ const InputField = ({ ...rest }: InputFieldProps) => { const { error, touched } = meta; - const { name, value, onChange } = input; + const { name, value, onChange, onFocus, onBlur } = input; const hasError = !!error && !!touched; + console.log(hasError, error, touched); + return ( diff --git a/src/common/Tag/Tag.js b/src/common/Tag/Tag.js index 3ec20038..638370d8 100644 --- a/src/common/Tag/Tag.js +++ b/src/common/Tag/Tag.js @@ -43,6 +43,8 @@ const COLLECTED_PROPS = [ 'label', 'name', 'onChange', + 'onBlur', + 'onFocus', 'onClick', 'onDoubleClick', 'onMouseDown', diff --git a/storybook/__tests__/__snapshots__/storyshots.test.js.snap b/storybook/__tests__/__snapshots__/storyshots.test.js.snap index 5349b5ef..6bc95007 100644 --- a/storybook/__tests__/__snapshots__/storyshots.test.js.snap +++ b/storybook/__tests__/__snapshots__/storyshots.test.js.snap @@ -2281,6 +2281,8 @@ exports[`Storyshots ATOMS/DATA ENTRY/CheckboxField default 1`] = `