react-hook-form 7.43.7 → 7.43.8
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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +6 -15
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/useFieldArray.d.ts.map +1 -1
- package/dist/useFormState.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.mjs
CHANGED
@@ -278,12 +278,6 @@ function useFormState(props) {
|
|
278
278
|
});
|
279
279
|
React.useEffect(() => {
|
280
280
|
_mounted.current = true;
|
281
|
-
const isDirty = control._proxyFormState.isDirty && control._getDirty();
|
282
|
-
if (isDirty !== control._formState.isDirty) {
|
283
|
-
control._subjects.state.next({
|
284
|
-
isDirty,
|
285
|
-
});
|
286
|
-
}
|
287
281
|
_localProxyFormState.current.isValid && control._updateValid(true);
|
288
282
|
return () => {
|
289
283
|
_mounted.current = false;
|
@@ -1101,15 +1095,12 @@ function useFieldArray(props) {
|
|
1101
1095
|
if (control._options.resolver) {
|
1102
1096
|
control._executeSchema([name]).then((result) => {
|
1103
1097
|
const error = get(result.errors, name);
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
errors: control._formState.errors,
|
1111
|
-
});
|
1112
|
-
}
|
1098
|
+
error
|
1099
|
+
? set(control._formState.errors, name, error)
|
1100
|
+
: unset(control._formState.errors, name);
|
1101
|
+
control._subjects.state.next({
|
1102
|
+
errors: control._formState.errors,
|
1103
|
+
});
|
1113
1104
|
});
|
1114
1105
|
}
|
1115
1106
|
else {
|