File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,9 +118,20 @@ function useField<
118118 const formState = form . getState ( ) ;
119119 let initialStateValue = initialValue ;
120120
121+ console . log ( '[useField DEBUG]' , {
122+ name,
123+ fieldInitialValue : initialValue ,
124+ formInitialValues : formState . initialValues ,
125+ hasFormInitialValues : ! ! formState . initialValues ,
126+ nameInFormInitialValues : formState . initialValues && name in formState . initialValues ,
127+ } ) ;
128+
121129 // Check Form-level initialValues (set via <Form initialValues={...}>)
122130 if ( formState . initialValues && name in formState . initialValues ) {
123131 initialStateValue = ( formState . initialValues as any ) [ name ] ;
132+ console . log ( '[useField DEBUG] Using Form initialValue:' , initialStateValue ) ;
133+ } else {
134+ console . log ( '[useField DEBUG] Using field initialValue:' , initialStateValue ) ;
124135 }
125136
126137 if ( component === "select" && multiple && initialStateValue === undefined ) {
You can’t perform that action at this time.
0 commit comments