{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/234","repository_url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form","labels_url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/234/comments","events_url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/234/events","html_url":"https://github.com/mozilla-services/react-jsonschema-form/pull/234","id":159389418,"number":234,"title":"Fixes #231: Reset object state on diffing formData keys.","user":{"login":"n1k0","id":41547,"avatar_url":"https://avatars.githubusercontent.com/u/41547?v=3","gravatar_id":"","url":"https://api.github.com/users/n1k0","html_url":"https://github.com/n1k0","followers_url":"https://api.github.com/users/n1k0/followers","following_url":"https://api.github.com/users/n1k0/following{/other_user}","gists_url":"https://api.github.com/users/n1k0/gists{/gist_id}","starred_url":"https://api.github.com/users/n1k0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1k0/subscriptions","organizations_url":"https://api.github.com/users/n1k0/orgs","repos_url":"https://api.github.com/users/n1k0/repos","events_url":"https://api.github.com/users/n1k0/events{/privacy}","received_events_url":"https://api.github.com/users/n1k0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-09T11:50:49Z","updated_at":"2016-06-09T15:59:40Z","closed_at":"2016-06-09T14:19:11Z","pull_request":{"url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/pulls/234","html_url":"https://github.com/mozilla-services/react-jsonschema-form/pull/234","diff_url":"https://github.com/mozilla-services/react-jsonschema-form/pull/234.diff","patch_url":"https://github.com/mozilla-services/react-jsonschema-form/pull/234.patch"},"body":"This is an attempt at fixing #231. When an `ObjectField` receives a new `formData` prop, we can't simply rely on `setState` to reflect the possible changes as `setState` *merges* the new data with the previous state ones, which means you cannot drop an object key atm (as the previously existing one will be kept along its associated value).\r\n\r\nThe patch detects diffing `formData` keys and replaces the component state entirely when these have changed.\r\n\r\nFeedback? @dpwrussell @mplis-jetsetter \r\n\r\nUpdate: I've updated the [playground](https://mozilla-services.github.io/react-jsonschema-form/) with the patch for easier QA."},"comment":{"url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/comments/224941641","html_url":"https://github.com/mozilla-services/react-jsonschema-form/pull/234#issuecomment-224941641","issue_url":"https://api.github.com/repos/mozilla-services/react-jsonschema-form/issues/234","id":224941641,"user":{"login":"alex-perfilov-reisys","id":6089683,"avatar_url":"https://avatars.githubusercontent.com/u/6089683?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-perfilov-reisys","html_url":"https://github.com/alex-perfilov-reisys","followers_url":"https://api.github.com/users/alex-perfilov-reisys/followers","following_url":"https://api.github.com/users/alex-perfilov-reisys/following{/other_user}","gists_url":"https://api.github.com/users/alex-perfilov-reisys/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-perfilov-reisys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-perfilov-reisys/subscriptions","organizations_url":"https://api.github.com/users/alex-perfilov-reisys/orgs","repos_url":"https://api.github.com/users/alex-perfilov-reisys/repos","events_url":"https://api.github.com/users/alex-perfilov-reisys/events{/privacy}","received_events_url":"https://api.github.com/users/alex-perfilov-reisys/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T15:59:40Z","updated_at":"2016-06-09T15:59:40Z","body":"attached screenshot, trying to get more details"}}
{"actor":{"display_login":"alex-perfilov-reisys"}}