Disable form submit on error

This commit is contained in:
Ildar Kamalov 2019-01-23 16:35:50 +03:00 committed by Eugene Bujak
parent b5e7237169
commit 6e41897323
1 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,8 @@ const Form = (props) => {
const {
t,
handleSubmit,
pristine,
submitting,
invalid,
} = props;
return (
@ -125,7 +125,7 @@ const Form = (props) => {
<button
type="submit"
className="btn btn-success btn-standard"
disabled={pristine || submitting}
disabled={submitting || invalid}
>
{t('save_config')}
</button>
@ -135,8 +135,8 @@ const Form = (props) => {
Form.propTypes = {
handleSubmit: PropTypes.func,
pristine: PropTypes.bool,
submitting: PropTypes.bool,
invalid: PropTypes.bool,
interfaces: PropTypes.object,
processing: PropTypes.bool,
initialValues: PropTypes.object,