ublo-lib 1.19.14 → 1.19.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,7 @@ function ContactForm({
|
|
|
45
45
|
const touched = forceTouch || field.touched;
|
|
46
46
|
const validators = overrideValidators || field.validators;
|
|
47
47
|
const error = touched ? Validation.validate(widgetLang, name, value, validators, fields) : undefined;
|
|
48
|
-
if (field.value !== value || field.error !== error || field.touched !== touched) {
|
|
48
|
+
if (field.value !== value || field.error !== undefined && field.error !== error || field.touched !== touched) {
|
|
49
49
|
return {
|
|
50
50
|
...fields,
|
|
51
51
|
[name]: {
|
|
@@ -107,7 +107,7 @@ function ContactForm({
|
|
|
107
107
|
} = e.target;
|
|
108
108
|
update(true, name, value);
|
|
109
109
|
};
|
|
110
|
-
const
|
|
110
|
+
const submitForm = async e => {
|
|
111
111
|
e.preventDefault();
|
|
112
112
|
setSubmiting(true);
|
|
113
113
|
validateAll();
|
|
@@ -159,7 +159,7 @@ function ContactForm({
|
|
|
159
159
|
}
|
|
160
160
|
return _jsxs("form", {
|
|
161
161
|
className: css.form,
|
|
162
|
-
onSubmit:
|
|
162
|
+
onSubmit: submitForm,
|
|
163
163
|
children: [_jsx(Select, {
|
|
164
164
|
label: Messages.get(widgetLang, "subject"),
|
|
165
165
|
className: css.fullWidthField,
|