2

I have a redux form with form fields as FieldArray. Initialising redux-form from state is pretty straightforward but my form has list of fields (FieldArray) and there is no documentation for initialising FieldArray form.

The problem seems to be because of field names (eg: members[0].lastName, members[0].firstName etc) And I've tried manually passing these keys but still got no form initialisation, please help.

2 Answers 2

2

I found a workaround, we can add enableReinitialize: true in form configuration object or we can use componentdidmout and calling arrayInsert action and passing all the parameters. Used this github issue: https://github.com/erikras/redux-form/issues/2349

Sign up to request clarification or add additional context in comments.

Comments

0

The name of FieldArray should have same name as the name of data you are going to pass in initialvalues of redux form.

fields props of Field Array component has data present only if we have pass valid name of Field Array

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.