@bombillazo/rhf-plus 7.60.1-plus.0 → 7.62.0-plus.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/README.md +15 -1
- 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
package/dist/index.esm.mjs
CHANGED
|
@@ -41,7 +41,7 @@ function cloneObject(data) {
|
|
|
41
41
|
}
|
|
42
42
|
else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&
|
|
43
43
|
(isArray || isObject(data))) {
|
|
44
|
-
copy = isArray ? [] :
|
|
44
|
+
copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
|
|
45
45
|
if (!isArray && !isPlainObject(data)) {
|
|
46
46
|
copy = data;
|
|
47
47
|
}
|
|
@@ -1770,8 +1770,10 @@ function createFormControl(props = {}) {
|
|
|
1770
1770
|
const watched = isWatched(name, _names, isBlurEvent);
|
|
1771
1771
|
set(_formValues, name, fieldValue);
|
|
1772
1772
|
if (isBlurEvent) {
|
|
1773
|
-
|
|
1774
|
-
|
|
1773
|
+
if (!target || !target.readOnly) {
|
|
1774
|
+
field._f.onBlur && field._f.onBlur(event);
|
|
1775
|
+
delayErrorCallback && delayErrorCallback(0);
|
|
1776
|
+
}
|
|
1775
1777
|
}
|
|
1776
1778
|
else if (field._f.onChange) {
|
|
1777
1779
|
field._f.onChange(event);
|
|
@@ -2266,6 +2268,7 @@ function createFormControl(props = {}) {
|
|
|
2266
2268
|
? _formState.isSubmitSuccessful
|
|
2267
2269
|
: false,
|
|
2268
2270
|
isSubmitting: false,
|
|
2271
|
+
defaultValues: _defaultValues,
|
|
2269
2272
|
});
|
|
2270
2273
|
};
|
|
2271
2274
|
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)
|