I'm having problems setting the initialValue of a FieldArray component in React Final Form. It works when I set it on the Form component, but not on the FieldArray. Please see below CodeSandbox examples:
On FieldArray: https://codesandbox.io/s/react-final-form-field-arrays-vq9pz
On Form: https://codesandbox.io/s/react-final-form-field-arrays-v90nn
I would prefer to have it set on the FieldArray, which seems like it should be possible if I look at the documentation here. Has anyone else come across this?
You can define
const customer = { firstName: "test", lastName: "test" };and then use it in here:Here is CodeSandbox example https://codesandbox.io/s/react-final-form-field-arrays-vmmf3?fontsize=14.