I've got a redux-form and I'm trying to initialize the form using initialValues. Given the following code, the form isn't being populated with either the name or the age:
const EmployeesForm = reduxForm({
form: 'addEmployee',
enableReinitialize: true
})(EmployeesFormComponent)
export default connect((state, ownProps) => {
const initialValues = { name: 'Jason', age: 24 }
return {
initialValues: initialValues
}
})(EmployeesForm)
But in the web dev console when inspecting the next state on redux, I can see that form.values and form.initial are both Map objects that hold those initialValue values.
How should I be transforming the object so that it "fits" into the form.
BTW I'm using: import { Field, reduxForm } from 'redux-form/immutable' and it's redux-form 6.8.0.
