react-hook-form 7.64.0 → 7.66.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 +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.mjs +89 -28
- 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 +3 -2
- package/dist/react-server.esm.mjs.map +1 -1
- package/dist/useFieldArray.d.ts.map +1 -1
- package/dist/useFormContext.d.ts +1 -1
- package/dist/watch.d.ts +39 -0
- package/dist/watch.d.ts.map +1 -0
- 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,EAiBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAqDlB,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,EAiBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAqDlB,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,CA27CA"}
|
|
@@ -303,7 +303,7 @@ function markFieldsDirty(data, fields = {}) {
|
|
|
303
303
|
fields[key] = Array.isArray(data[key]) ? [] : {};
|
|
304
304
|
markFieldsDirty(data[key], fields[key]);
|
|
305
305
|
}
|
|
306
|
-
else if (!
|
|
306
|
+
else if (!isUndefined(data[key])) {
|
|
307
307
|
fields[key] = true;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
@@ -1682,7 +1682,8 @@ function createFormControl(props = {}) {
|
|
|
1682
1682
|
_state.mount =
|
|
1683
1683
|
!_proxyFormState.isValid ||
|
|
1684
1684
|
!!keepStateOptions.keepIsValid ||
|
|
1685
|
-
!!keepStateOptions.keepDirtyValues
|
|
1685
|
+
!!keepStateOptions.keepDirtyValues ||
|
|
1686
|
+
(!_options.shouldUnregister && !isEmptyObject(values));
|
|
1686
1687
|
_state.watch = !!_options.shouldUnregister;
|
|
1687
1688
|
_subjects.state.next({
|
|
1688
1689
|
submitCount: keepStateOptions.keepSubmitCount
|