{"action":"opened","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1749","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1749/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1749/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1749/events","html_url":"https://github.com/erikras/redux-form/issues/1749","id":176559860,"number":1749,"title":"Initial values from container component","user":{"login":"gilesbutler","id":790734,"avatar_url":"https://avatars.githubusercontent.com/u/790734?v=3","gravatar_id":"","url":"https://api.github.com/users/gilesbutler","html_url":"https://github.com/gilesbutler","followers_url":"https://api.github.com/users/gilesbutler/followers","following_url":"https://api.github.com/users/gilesbutler/following{/other_user}","gists_url":"https://api.github.com/users/gilesbutler/gists{/gist_id}","starred_url":"https://api.github.com/users/gilesbutler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilesbutler/subscriptions","organizations_url":"https://api.github.com/users/gilesbutler/orgs","repos_url":"https://api.github.com/users/gilesbutler/repos","events_url":"https://api.github.com/users/gilesbutler/events{/privacy}","received_events_url":"https://api.github.com/users/gilesbutler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-13T06:26:24Z","updated_at":"2016-09-13T06:26:24Z","closed_at":null,"body":"Hey,\r\n\r\nI have a container component that passes through my initial values as props using mapStateToProps.\r\n\r\n    const mapStateToProps = (state) => (\r\n      {\r\n        initialValues: {\r\n          applicantAgent: 'female',\r\n          applicantPhone: '123123',\r\n        },\r\n      }\r\n    );\r\n\r\n    const mapDispatchToProps ...\r\n\r\n    const FormContainer = connect(\r\n      mapStateToProps,\r\n      mapDispatchToProps\r\n    )(Form);\r\n\r\n    export default FormContainer;\r\n\r\nI can see in the Redux dev tools that the initial values are being picked up by Redux Form:\r\n![screen shot 2016-09-13 at 16 20 20](https://cloud.githubusercontent.com/assets/790734/18463503/06bf01f4-79ce-11e6-8add-d0ec8dc940dc.png)\r\n\r\nBut the actual form fields are empty. If I set the exact same initial values on the reduxForm decorator it works correctly:\r\n\r\n    export default reduxForm({\r\n      form: 'TestForm',                 // <------ same form name\r\n      destroyOnUnmount: false,     // <------ preserve form data\r\n      enableReinitialize: true,\r\n      keepDirtyOnReinitialize: true,\r\n      validate,                    // <------ only validates the fields on this page\r\n      initialValues: {\r\n         applicantAgent: 'female',\r\n         applicantPhone: '123123',\r\n      },\r\n    })(Form);\r\n\r\nI've tried with and without ````enableReinitialize```` & ````keepDirtyOnReinitialize```` but they don't make any difference.\r\n\r\nI'm using Redux Form 6.0.2 and redux-form/immutable as we are using Immutable if that makes a difference.\r\n\r\nI just can't seem to get this working, is it a bug or am I missing something?\r\n\r\nThanks"}}
{"actor":{"display_login":"gilesbutler"}}