@forge/react
11.17.0-experimental-04cc2b911.18.0-next.0
out/hooks/useForm.js~
out/hooks/useForm.jsModified+3−2
Index: package/out/hooks/useForm.js
===================================================================
--- package/out/hooks/useForm.js
+++ package/out/hooks/useForm.js
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.useForm = useForm;
+exports.useForm = void 0;
const tslib_1 = require("tslib");
const react_1 = require("react");
const react_hook_form_1 = require("react-hook-form");
const get_1 = tslib_1.__importDefault(require("lodash/get"));
@@ -16,9 +16,9 @@
handleSubmit, setValue, getValues, trigger, clearErrors
// Only allow for defaultValues in props for the timebeing
} = (0, react_hook_form_1.useForm)({
defaultValues: props.defaultValues,
- mode: 'onBlur', // defaulting to validating onBlur to follow ADS behaviour
+ mode: 'onBlur',
reValidateMode: 'onChange'
});
const defaultValues = props?.defaultValues;
const forgeFormRegister = (fieldName, options) => {
@@ -105,4 +105,5 @@
trigger,
clearErrors
};
}
+exports.useForm = useForm;