{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1790","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1790/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1790/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1790/events","html_url":"https://github.com/erikras/redux-form/issues/1790","id":177488600,"number":1790,"title":"How to push new field in FieldArray from outside render function?","user":{"login":"raapperez","id":1810586,"avatar_url":"https://avatars.githubusercontent.com/u/1810586?v=3","gravatar_id":"","url":"https://api.github.com/users/raapperez","html_url":"https://github.com/raapperez","followers_url":"https://api.github.com/users/raapperez/followers","following_url":"https://api.github.com/users/raapperez/following{/other_user}","gists_url":"https://api.github.com/users/raapperez/gists{/gist_id}","starred_url":"https://api.github.com/users/raapperez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raapperez/subscriptions","organizations_url":"https://api.github.com/users/raapperez/orgs","repos_url":"https://api.github.com/users/raapperez/repos","events_url":"https://api.github.com/users/raapperez/events{/privacy}","received_events_url":"https://api.github.com/users/raapperez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-16T18:20:14Z","updated_at":"2016-09-30T18:17:03Z","closed_at":null,"body":"Hi, I am using redux-form v6.0.5 and it is great.\r\n\r\nI am trying to add new items in the FIeldArray but it need to be done by a button from outside the FieldArray component render function. How it can be done?\r\n\r\nI already saw in the docs this way to do from inside the component render function:\r\n```\r\nconst renderMembers = ({ fields, meta: { touched, error } }) => (\r\n  <ul>\r\n    <li>\r\n      <button type=\"button\" onClick={() => fields.push({})}>Add Member</button>\r\n...\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/250815244","html_url":"https://github.com/erikras/redux-form/issues/1790#issuecomment-250815244","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/1790","id":250815244,"user":{"login":"slavab89","id":10363263,"avatar_url":"https://avatars.githubusercontent.com/u/10363263?v=3","gravatar_id":"","url":"https://api.github.com/users/slavab89","html_url":"https://github.com/slavab89","followers_url":"https://api.github.com/users/slavab89/followers","following_url":"https://api.github.com/users/slavab89/following{/other_user}","gists_url":"https://api.github.com/users/slavab89/gists{/gist_id}","starred_url":"https://api.github.com/users/slavab89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavab89/subscriptions","organizations_url":"https://api.github.com/users/slavab89/orgs","repos_url":"https://api.github.com/users/slavab89/repos","events_url":"https://api.github.com/users/slavab89/events{/privacy}","received_events_url":"https://api.github.com/users/slavab89/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T18:17:03Z","updated_at":"2016-09-30T18:17:03Z","body":"You can either use arrayPush (You'll need the dispatch to do the action) or populate the click back to the form and there perform the push.\r\n\r\n```javascript\r\nimport { arrayPush } from 'redux-form';\r\n\r\n// ...\r\ndispatch(arrayPush('myForm', 'myFieldName', {}));\r\n// ...\r\n```"}}
{"actor":{"display_login":"slavab89"}}