react-hook-form 7.25.1 → 7.25.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/README.md +6 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +2 -1
- 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/package.json +1 -1
package/dist/index.esm.mjs
CHANGED
@@ -40,6 +40,7 @@ var get = (obj, path, defaultValue) => {
|
|
40
40
|
|
41
41
|
const EVENTS = {
|
42
42
|
BLUR: 'blur',
|
43
|
+
FOCUS_OUT: 'focusout',
|
43
44
|
CHANGE: 'change',
|
44
45
|
};
|
45
46
|
const VALIDATION_MODE = {
|
@@ -1413,7 +1414,7 @@ function createFormControl(props = {}) {
|
|
1413
1414
|
const fieldValue = target.type
|
1414
1415
|
? getFieldValue(field._f)
|
1415
1416
|
: getEventValue(event);
|
1416
|
-
const isBlurEvent = event.type === EVENTS.BLUR;
|
1417
|
+
const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;
|
1417
1418
|
const shouldSkipValidation = (!hasValidation(field._f) &&
|
1418
1419
|
!_options.resolver &&
|
1419
1420
|
!get(_formState.errors, name) &&
|