Disable form submit on error
This commit is contained in:
parent
b5e7237169
commit
6e41897323
@ -48,8 +48,8 @@ const Form = (props) => {
|
|||||||
const {
|
const {
|
||||||
t,
|
t,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
pristine,
|
|
||||||
submitting,
|
submitting,
|
||||||
|
invalid,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -125,7 +125,7 @@ const Form = (props) => {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-success btn-standard"
|
className="btn btn-success btn-standard"
|
||||||
disabled={pristine || submitting}
|
disabled={submitting || invalid}
|
||||||
>
|
>
|
||||||
{t('save_config')}
|
{t('save_config')}
|
||||||
</button>
|
</button>
|
||||||
@ -135,8 +135,8 @@ const Form = (props) => {
|
|||||||
|
|
||||||
Form.propTypes = {
|
Form.propTypes = {
|
||||||
handleSubmit: PropTypes.func,
|
handleSubmit: PropTypes.func,
|
||||||
pristine: PropTypes.bool,
|
|
||||||
submitting: PropTypes.bool,
|
submitting: PropTypes.bool,
|
||||||
|
invalid: PropTypes.bool,
|
||||||
interfaces: PropTypes.object,
|
interfaces: PropTypes.object,
|
||||||
processing: PropTypes.bool,
|
processing: PropTypes.bool,
|
||||||
initialValues: PropTypes.object,
|
initialValues: PropTypes.object,
|
||||||
|
Loading…
Reference in New Issue
Block a user