diff --git a/src/logic/createFormControl.ts b/src/logic/createFormControl.ts index ad75af5cb13..f5c244da5fa 100644 --- a/src/logic/createFormControl.ts +++ b/src/logic/createFormControl.ts @@ -501,6 +501,7 @@ export function createFormControl< : defaultValue), }, isGlobal, + defaultValue, ); const _getFieldArray = ( diff --git a/src/logic/generateWatchOutput.ts b/src/logic/generateWatchOutput.ts index ba117392f96..6ac76145d58 100644 --- a/src/logic/generateWatchOutput.ts +++ b/src/logic/generateWatchOutput.ts @@ -1,16 +1,17 @@ -import { FieldValues, Names } from '../types'; +import { DeepPartial, FieldValues, Names } from '../types'; import get from '../utils/get'; import isString from '../utils/isString'; -export default ( +export default ( names: string | string[] | undefined, _names: Names, formValues?: FieldValues, isGlobal?: boolean, + defaultValue?: DeepPartial, ) => { if (isString(names)) { isGlobal && _names.watch.add(names); - return get(formValues, names); + return get(formValues, names, defaultValue); } if (Array.isArray(names)) {