react-hook-form 7.61.1 → 7.62.0
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 -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/react-server.esm.mjs +6 -3
- package/dist/react-server.esm.mjs.map +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAaV,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EAEjC,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAM,GACnE,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,CAAC;CACH,
|
1
|
+
{"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAaV,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EACd,kBAAkB,GAAG,YAAY,EAEjC,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAM,GACnE,IAAI,CACL,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,GAAG;IACF,WAAW,EAAE,IAAI,CACf,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,EACzD,WAAW,CACZ,CAAC;CACH,CA+6CA"}
|
@@ -56,7 +56,7 @@ function cloneObject(data) {
|
|
56
56
|
}
|
57
57
|
else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&
|
58
58
|
(isArray || isObject(data))) {
|
59
|
-
copy = isArray ? [] :
|
59
|
+
copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
|
60
60
|
if (!isArray && !isPlainObject(data)) {
|
61
61
|
copy = data;
|
62
62
|
}
|
@@ -1202,8 +1202,10 @@ function createFormControl(props = {}) {
|
|
1202
1202
|
const watched = isWatched(name, _names, isBlurEvent);
|
1203
1203
|
set(_formValues, name, fieldValue);
|
1204
1204
|
if (isBlurEvent) {
|
1205
|
-
|
1206
|
-
|
1205
|
+
if (!target || !target.readOnly) {
|
1206
|
+
field._f.onBlur && field._f.onBlur(event);
|
1207
|
+
delayErrorCallback && delayErrorCallback(0);
|
1208
|
+
}
|
1207
1209
|
}
|
1208
1210
|
else if (field._f.onChange) {
|
1209
1211
|
field._f.onChange(event);
|
@@ -1698,6 +1700,7 @@ function createFormControl(props = {}) {
|
|
1698
1700
|
? _formState.isSubmitSuccessful
|
1699
1701
|
: false,
|
1700
1702
|
isSubmitting: false,
|
1703
|
+
defaultValues: _defaultValues,
|
1701
1704
|
});
|
1702
1705
|
};
|
1703
1706
|
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)
|