diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/TextField.js b/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/TextField.js index 79378e8af..5c5814aee 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/TextField.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/TextField.js @@ -1,3 +1,4 @@ +import { PropTypes } from 'prop-types'; import preventEnterSubmit from '../../../../utils/preventEnterSubmit'; import css from './TextField.module.css'; @@ -23,6 +24,7 @@ const TextField = (props) => { onKeyDown={preventEnterSubmit} required={(props.requredField) ? 'required' : ''} disabled={(props.name === 'email') ? 'disabled' : ''} + onBlur={props.onBlur} >
@@ -38,3 +40,15 @@ const TextField = (props) => { }; export default TextField; + +TextField.propTypes = { + requredField: PropTypes.bool, + label: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + value: PropTypes.string, + fieldPlaceholder: PropTypes.string, + maxLength: PropTypes.number, + updateHandler: PropTypes.func, + error: PropTypes.string, + onBlur: PropTypes.func, + }; \ No newline at end of file