react-hook-form 7.51.1 → 7.51.2
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 +8 -3
- 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/logic/createFormControl.d.ts.map +1 -1
- package/dist/utils/objectHasTruthyValue.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.mjs
CHANGED
@@ -1598,11 +1598,16 @@ function createFormControl(props = {}) {
|
|
1598
1598
|
};
|
1599
1599
|
const _updateIsValidating = (names, isValidating) => {
|
1600
1600
|
if (_proxyFormState.isValidating || _proxyFormState.validatingFields) {
|
1601
|
-
(names || Array.from(_names.mount)).forEach((name) =>
|
1602
|
-
|
1601
|
+
(names || Array.from(_names.mount)).forEach((name) => {
|
1602
|
+
if (name) {
|
1603
|
+
isValidating
|
1604
|
+
? set(_formState.validatingFields, name, isValidating)
|
1605
|
+
: unset(_formState.validatingFields, name);
|
1606
|
+
}
|
1607
|
+
});
|
1603
1608
|
_subjects.state.next({
|
1604
1609
|
validatingFields: _formState.validatingFields,
|
1605
|
-
isValidating: _formState.
|
1610
|
+
isValidating: !isEmptyObject(_formState.validatingFields),
|
1606
1611
|
});
|
1607
1612
|
}
|
1608
1613
|
};
|