From 6e41897323fc91466870420a621459ec654e6c20 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov <i.kamalov@adguard.com> Date: Wed, 23 Jan 2019 16:35:50 +0300 Subject: [PATCH] Disable form submit on error --- client/src/components/Settings/Dhcp/Form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/Settings/Dhcp/Form.js b/client/src/components/Settings/Dhcp/Form.js index ec25c9aa..33eb6ca2 100644 --- a/client/src/components/Settings/Dhcp/Form.js +++ b/client/src/components/Settings/Dhcp/Form.js @@ -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,