{"action":"closed","number":162,"pull_request":{"url":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162","id":42404515,"html_url":"https://github.com/Hacker0x01/react-datepicker/pull/162","diff_url":"https://github.com/Hacker0x01/react-datepicker/pull/162.diff","patch_url":"https://github.com/Hacker0x01/react-datepicker/pull/162.patch","issue_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/162","number":162,"state":"closed","locked":false,"title":"Bugfix ie infinite loop","user":{"login":"dcousineau","id":30331,"avatar_url":"https://avatars.githubusercontent.com/u/30331?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousineau","html_url":"https://github.com/dcousineau","followers_url":"https://api.github.com/users/dcousineau/followers","following_url":"https://api.github.com/users/dcousineau/following{/other_user}","gists_url":"https://api.github.com/users/dcousineau/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousineau/subscriptions","organizations_url":"https://api.github.com/users/dcousineau/orgs","repos_url":"https://api.github.com/users/dcousineau/repos","events_url":"https://api.github.com/users/dcousineau/events{/privacy}","received_events_url":"https://api.github.com/users/dcousineau/received_events","type":"User","site_admin":false},"body":"This PR does 2 specific things IRT to fixing #141 \r\n\r\nIt makes date_input.jsx properly state-less, reducing complexity.\r\n\r\nIt also upgrades datepicker.jsx to prevent repeated calls clearing the state if it has already been cleared. IE would trigger an onChange every time we set its value to null, causing the clearSelection to bubble up, set state, set the value, and repeat ad nauseam. This also upgrades datepicker.jsx to follow best practices of using setState callbacks to prevent subtle timing bugs.\r\n\r\n----\r\n\r\n### Notes for the future.\r\n\r\nThis bug was caused by a loop of competing states (and IE being overzealous about change events). Current best practice in React would be to eliminate the usage of state to track value and instead mimic a managed component (e.g. `<input value={} onChange={} />`). This PR is just a bugfix only without changing too much, but it could be done easily with 1 exception: a BC break by eliminating passing the value in the `onBlur` callback.","created_at":"2015-08-13T22:01:13Z","updated_at":"2015-08-14T03:07:45Z","closed_at":"2015-08-14T03:07:45Z","merged_at":"2015-08-14T03:07:45Z","merge_commit_sha":"c9adaa786e842ff66fe0a1e32fa8579e970c751d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162/commits","review_comments_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162/comments","review_comment_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/162/comments","statuses_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/statuses/9421420f1833ed3d347850284fc59d87132f64e2","head":{"label":"croscon:bugfix-ie-infinite-loop","ref":"bugfix-ie-infinite-loop","sha":"9421420f1833ed3d347850284fc59d87132f64e2","user":{"login":"croscon","id":640218,"avatar_url":"https://avatars.githubusercontent.com/u/640218?v=3","gravatar_id":"","url":"https://api.github.com/users/croscon","html_url":"https://github.com/croscon","followers_url":"https://api.github.com/users/croscon/followers","following_url":"https://api.github.com/users/croscon/following{/other_user}","gists_url":"https://api.github.com/users/croscon/gists{/gist_id}","starred_url":"https://api.github.com/users/croscon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croscon/subscriptions","organizations_url":"https://api.github.com/users/croscon/orgs","repos_url":"https://api.github.com/users/croscon/repos","events_url":"https://api.github.com/users/croscon/events{/privacy}","received_events_url":"https://api.github.com/users/croscon/received_events","type":"Organization","site_admin":false},"repo":{"id":38318992,"name":"react-datepicker","full_name":"croscon/react-datepicker","owner":{"login":"croscon","id":640218,"avatar_url":"https://avatars.githubusercontent.com/u/640218?v=3","gravatar_id":"","url":"https://api.github.com/users/croscon","html_url":"https://github.com/croscon","followers_url":"https://api.github.com/users/croscon/followers","following_url":"https://api.github.com/users/croscon/following{/other_user}","gists_url":"https://api.github.com/users/croscon/gists{/gist_id}","starred_url":"https://api.github.com/users/croscon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croscon/subscriptions","organizations_url":"https://api.github.com/users/croscon/orgs","repos_url":"https://api.github.com/users/croscon/repos","events_url":"https://api.github.com/users/croscon/events{/privacy}","received_events_url":"https://api.github.com/users/croscon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/croscon/react-datepicker","description":"A simple and reusable datepicker component for React","fork":true,"url":"https://api.github.com/repos/croscon/react-datepicker","forks_url":"https://api.github.com/repos/croscon/react-datepicker/forks","keys_url":"https://api.github.com/repos/croscon/react-datepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/croscon/react-datepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/croscon/react-datepicker/teams","hooks_url":"https://api.github.com/repos/croscon/react-datepicker/hooks","issue_events_url":"https://api.github.com/repos/croscon/react-datepicker/issues/events{/number}","events_url":"https://api.github.com/repos/croscon/react-datepicker/events","assignees_url":"https://api.github.com/repos/croscon/react-datepicker/assignees{/user}","branches_url":"https://api.github.com/repos/croscon/react-datepicker/branches{/branch}","tags_url":"https://api.github.com/repos/croscon/react-datepicker/tags","blobs_url":"https://api.github.com/repos/croscon/react-datepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/croscon/react-datepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/croscon/react-datepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/croscon/react-datepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/croscon/react-datepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/croscon/react-datepicker/languages","stargazers_url":"https://api.github.com/repos/croscon/react-datepicker/stargazers","contributors_url":"https://api.github.com/repos/croscon/react-datepicker/contributors","subscribers_url":"https://api.github.com/repos/croscon/react-datepicker/subscribers","subscription_url":"https://api.github.com/repos/croscon/react-datepicker/subscription","commits_url":"https://api.github.com/repos/croscon/react-datepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/croscon/react-datepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/croscon/react-datepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/croscon/react-datepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/croscon/react-datepicker/contents/{+path}","compare_url":"https://api.github.com/repos/croscon/react-datepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/croscon/react-datepicker/merges","archive_url":"https://api.github.com/repos/croscon/react-datepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/croscon/react-datepicker/downloads","issues_url":"https://api.github.com/repos/croscon/react-datepicker/issues{/number}","pulls_url":"https://api.github.com/repos/croscon/react-datepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/croscon/react-datepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/croscon/react-datepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/croscon/react-datepicker/labels{/name}","releases_url":"https://api.github.com/repos/croscon/react-datepicker/releases{/id}","created_at":"2015-06-30T16:00:23Z","updated_at":"2015-06-30T16:00:24Z","pushed_at":"2015-08-13T21:58:08Z","git_url":"git://github.com/croscon/react-datepicker.git","ssh_url":"git@github.com:croscon/react-datepicker.git","clone_url":"https://github.com/croscon/react-datepicker.git","svn_url":"https://github.com/croscon/react-datepicker","homepage":"","size":2078,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Hacker0x01:master","ref":"master","sha":"397a8e570ce5aad22242fe8ae65d2028f30c8c86","user":{"login":"Hacker0x01","id":3014877,"avatar_url":"https://avatars.githubusercontent.com/u/3014877?v=3","gravatar_id":"","url":"https://api.github.com/users/Hacker0x01","html_url":"https://github.com/Hacker0x01","followers_url":"https://api.github.com/users/Hacker0x01/followers","following_url":"https://api.github.com/users/Hacker0x01/following{/other_user}","gists_url":"https://api.github.com/users/Hacker0x01/gists{/gist_id}","starred_url":"https://api.github.com/users/Hacker0x01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hacker0x01/subscriptions","organizations_url":"https://api.github.com/users/Hacker0x01/orgs","repos_url":"https://api.github.com/users/Hacker0x01/repos","events_url":"https://api.github.com/users/Hacker0x01/events{/privacy}","received_events_url":"https://api.github.com/users/Hacker0x01/received_events","type":"Organization","site_admin":false},"repo":{"id":21088356,"name":"react-datepicker","full_name":"Hacker0x01/react-datepicker","owner":{"login":"Hacker0x01","id":3014877,"avatar_url":"https://avatars.githubusercontent.com/u/3014877?v=3","gravatar_id":"","url":"https://api.github.com/users/Hacker0x01","html_url":"https://github.com/Hacker0x01","followers_url":"https://api.github.com/users/Hacker0x01/followers","following_url":"https://api.github.com/users/Hacker0x01/following{/other_user}","gists_url":"https://api.github.com/users/Hacker0x01/gists{/gist_id}","starred_url":"https://api.github.com/users/Hacker0x01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hacker0x01/subscriptions","organizations_url":"https://api.github.com/users/Hacker0x01/orgs","repos_url":"https://api.github.com/users/Hacker0x01/repos","events_url":"https://api.github.com/users/Hacker0x01/events{/privacy}","received_events_url":"https://api.github.com/users/Hacker0x01/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Hacker0x01/react-datepicker","description":"A simple and reusable datepicker component for React","fork":false,"url":"https://api.github.com/repos/Hacker0x01/react-datepicker","forks_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/forks","keys_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/teams","hooks_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/hooks","issue_events_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/events{/number}","events_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/events","assignees_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/assignees{/user}","branches_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/branches{/branch}","tags_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/tags","blobs_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/languages","stargazers_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/stargazers","contributors_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/contributors","subscribers_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/subscribers","subscription_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/subscription","commits_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/contents/{+path}","compare_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/merges","archive_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/downloads","issues_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues{/number}","pulls_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/labels{/name}","releases_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/releases{/id}","created_at":"2014-06-22T07:40:48Z","updated_at":"2015-08-12T09:43:20Z","pushed_at":"2015-08-14T03:07:45Z","git_url":"git://github.com/Hacker0x01/react-datepicker.git","ssh_url":"git@github.com:Hacker0x01/react-datepicker.git","clone_url":"https://github.com/Hacker0x01/react-datepicker.git","svn_url":"https://github.com/Hacker0x01/react-datepicker","homepage":"https://hacker0x01.github.io/react-datepicker","size":5881,"stargazers_count":176,"watchers_count":176,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":85,"mirror_url":null,"open_issues_count":22,"forks":85,"open_issues":22,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162"},"html":{"href":"https://github.com/Hacker0x01/react-datepicker/pull/162"},"issue":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/162"},"comments":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/Hacker0x01/react-datepicker/statuses/9421420f1833ed3d347850284fc59d87132f64e2"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"martijnrusschen","id":1412392,"avatar_url":"https://avatars.githubusercontent.com/u/1412392?v=3","gravatar_id":"","url":"https://api.github.com/users/martijnrusschen","html_url":"https://github.com/martijnrusschen","followers_url":"https://api.github.com/users/martijnrusschen/followers","following_url":"https://api.github.com/users/martijnrusschen/following{/other_user}","gists_url":"https://api.github.com/users/martijnrusschen/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnrusschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnrusschen/subscriptions","organizations_url":"https://api.github.com/users/martijnrusschen/orgs","repos_url":"https://api.github.com/users/martijnrusschen/repos","events_url":"https://api.github.com/users/martijnrusschen/events{/privacy}","received_events_url":"https://api.github.com/users/martijnrusschen/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":29,"deletions":52,"changed_files":4}}