{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1489","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1489/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1489/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1489/events","html_url":"https://github.com/erikras/redux-form/pull/1489","id":169994746,"number":1489,"title":"[v6] Fixed the pristine/dirty state of fields that get reinitialized to an empty value.","user":{"login":"hathawsh","id":637806,"avatar_url":"https://avatars.githubusercontent.com/u/637806?v=3","gravatar_id":"","url":"https://api.github.com/users/hathawsh","html_url":"https://github.com/hathawsh","followers_url":"https://api.github.com/users/hathawsh/followers","following_url":"https://api.github.com/users/hathawsh/following{/other_user}","gists_url":"https://api.github.com/users/hathawsh/gists{/gist_id}","starred_url":"https://api.github.com/users/hathawsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hathawsh/subscriptions","organizations_url":"https://api.github.com/users/hathawsh/orgs","repos_url":"https://api.github.com/users/hathawsh/repos","events_url":"https://api.github.com/users/hathawsh/events{/privacy}","received_events_url":"https://api.github.com/users/hathawsh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-08T18:42:01Z","updated_at":"2016-08-08T20:46:49Z","closed_at":"2016-08-08T20:46:46Z","pull_request":{"url":"https://api.github.com/repos/erikras/redux-form/pulls/1489","html_url":"https://github.com/erikras/redux-form/pull/1489","diff_url":"https://github.com/erikras/redux-form/pull/1489.diff","patch_url":"https://github.com/erikras/redux-form/pull/1489.patch"},"body":"Here's a simple fix. I noticed that if a field has a non-empty initial value, then I clear the field and reinitialize the form with an empty string, the field should become pristine, but does not (as of 6.0.0-rc.4). This happens because the code treats an empty string as no value at all and falls back to the original initial value. This pull request fixes the problem by expecting 'undefined' to be the only value that indicates the initial value is missing. Test included."},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/238371611","html_url":"https://github.com/erikras/redux-form/pull/1489#issuecomment-238371611","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/1489","id":238371611,"user":{"login":"erikras","id":4396759,"avatar_url":"https://avatars.githubusercontent.com/u/4396759?v=3","gravatar_id":"","url":"https://api.github.com/users/erikras","html_url":"https://github.com/erikras","followers_url":"https://api.github.com/users/erikras/followers","following_url":"https://api.github.com/users/erikras/following{/other_user}","gists_url":"https://api.github.com/users/erikras/gists{/gist_id}","starred_url":"https://api.github.com/users/erikras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikras/subscriptions","organizations_url":"https://api.github.com/users/erikras/orgs","repos_url":"https://api.github.com/users/erikras/repos","events_url":"https://api.github.com/users/erikras/events{/privacy}","received_events_url":"https://api.github.com/users/erikras/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T20:46:49Z","updated_at":"2016-08-08T20:46:49Z","body":"Very interesting bug. It took me a while to recreate it and verify, but you explained it perfectly.\r\n\r\nGreat PR! 👍 "}}
{"actor":{"display_login":"erikras"}}