{"action":"created","comment":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/comments/35747810","id":35747810,"diff_hunk":"@@ -277,6 +277,11 @@ const Modal = React.createClass({\n     }\n   },\n \n+  componentWillUnmount() {\n+    this.onHide();\n+    this.props.onHide();","path":"src/Modal.js","position":6,"original_position":6,"commit_id":"f9d8b1e7b1ec1501818c5920dcdf8ccd117eca49","original_commit_id":"f9d8b1e7b1ec1501818c5920dcdf8ccd117eca49","user":{"login":"wgcrouch","id":340761,"avatar_url":"https://avatars.githubusercontent.com/u/340761?v=3","gravatar_id":"","url":"https://api.github.com/users/wgcrouch","html_url":"https://github.com/wgcrouch","followers_url":"https://api.github.com/users/wgcrouch/followers","following_url":"https://api.github.com/users/wgcrouch/following{/other_user}","gists_url":"https://api.github.com/users/wgcrouch/gists{/gist_id}","starred_url":"https://api.github.com/users/wgcrouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wgcrouch/subscriptions","organizations_url":"https://api.github.com/users/wgcrouch/orgs","repos_url":"https://api.github.com/users/wgcrouch/repos","events_url":"https://api.github.com/users/wgcrouch/events{/privacy}","received_events_url":"https://api.github.com/users/wgcrouch/received_events","type":"User","site_admin":false},"body":"sorry, that was a probably a bit unclear. \r\n\r\nIf a users clicks something to hide the modal, eg the backdrop, props.onHide is called. The parent component handles the callback and sets some state which causes the modal to not be rendered, which results in a call to componentWillUnmount, which then calles props.onHide again. ","created_at":"2015-07-29T10:59:34Z","updated_at":"2015-07-29T10:59:34Z","html_url":"https://github.com/react-bootstrap/react-bootstrap/pull/1079#discussion_r35747810","pull_request_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079","_links":{"self":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/comments/35747810"},"html":{"href":"https://github.com/react-bootstrap/react-bootstrap/pull/1079#discussion_r35747810"},"pull_request":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079"}}},"pull_request":{"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079","id":41106988,"html_url":"https://github.com/react-bootstrap/react-bootstrap/pull/1079","diff_url":"https://github.com/react-bootstrap/react-bootstrap/pull/1079.diff","patch_url":"https://github.com/react-bootstrap/react-bootstrap/pull/1079.patch","issue_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/1079","number":1079,"state":"open","locked":false,"title":"Modal: added finalisation for the component when it was unbound from the tree","user":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"body":"Fix for #1078\r\n\r\nThe component must clean up after itself when it was unmounted","created_at":"2015-07-29T10:14:34Z","updated_at":"2015-07-29T10:59:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d99c65a8e4931e22af764c4c20bf8495132e105","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079/commits","review_comments_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079/comments","review_comment_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/1079/comments","statuses_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/statuses/f9d8b1e7b1ec1501818c5920dcdf8ccd117eca49","head":{"label":"zerkms:modal-unmount","ref":"modal-unmount","sha":"f9d8b1e7b1ec1501818c5920dcdf8ccd117eca49","user":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"repo":{"id":39885943,"name":"react-bootstrap","full_name":"zerkms/react-bootstrap","owner":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zerkms/react-bootstrap","description":"Bootstrap 3 components built with React","fork":true,"url":"https://api.github.com/repos/zerkms/react-bootstrap","forks_url":"https://api.github.com/repos/zerkms/react-bootstrap/forks","keys_url":"https://api.github.com/repos/zerkms/react-bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zerkms/react-bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zerkms/react-bootstrap/teams","hooks_url":"https://api.github.com/repos/zerkms/react-bootstrap/hooks","issue_events_url":"https://api.github.com/repos/zerkms/react-bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/zerkms/react-bootstrap/events","assignees_url":"https://api.github.com/repos/zerkms/react-bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/zerkms/react-bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/zerkms/react-bootstrap/tags","blobs_url":"https://api.github.com/repos/zerkms/react-bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zerkms/react-bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zerkms/react-bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/zerkms/react-bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zerkms/react-bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/zerkms/react-bootstrap/languages","stargazers_url":"https://api.github.com/repos/zerkms/react-bootstrap/stargazers","contributors_url":"https://api.github.com/repos/zerkms/react-bootstrap/contributors","subscribers_url":"https://api.github.com/repos/zerkms/react-bootstrap/subscribers","subscription_url":"https://api.github.com/repos/zerkms/react-bootstrap/subscription","commits_url":"https://api.github.com/repos/zerkms/react-bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/zerkms/react-bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/zerkms/react-bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/zerkms/react-bootstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/zerkms/react-bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/zerkms/react-bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zerkms/react-bootstrap/merges","archive_url":"https://api.github.com/repos/zerkms/react-bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zerkms/react-bootstrap/downloads","issues_url":"https://api.github.com/repos/zerkms/react-bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/zerkms/react-bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/zerkms/react-bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/zerkms/react-bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zerkms/react-bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/zerkms/react-bootstrap/releases{/id}","created_at":"2015-07-29T09:47:11Z","updated_at":"2015-07-29T09:47:12Z","pushed_at":"2015-07-29T10:13:43Z","git_url":"git://github.com/zerkms/react-bootstrap.git","ssh_url":"git@github.com:zerkms/react-bootstrap.git","clone_url":"https://github.com/zerkms/react-bootstrap.git","svn_url":"https://github.com/zerkms/react-bootstrap","homepage":"http://react-bootstrap.github.io/","size":3497,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"react-bootstrap:master","ref":"master","sha":"23f3e0c95c22713851d9233fcc6d4de0d77719d1","user":{"login":"react-bootstrap","id":6853419,"avatar_url":"https://avatars.githubusercontent.com/u/6853419?v=3","gravatar_id":"","url":"https://api.github.com/users/react-bootstrap","html_url":"https://github.com/react-bootstrap","followers_url":"https://api.github.com/users/react-bootstrap/followers","following_url":"https://api.github.com/users/react-bootstrap/following{/other_user}","gists_url":"https://api.github.com/users/react-bootstrap/gists{/gist_id}","starred_url":"https://api.github.com/users/react-bootstrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/react-bootstrap/subscriptions","organizations_url":"https://api.github.com/users/react-bootstrap/orgs","repos_url":"https://api.github.com/users/react-bootstrap/repos","events_url":"https://api.github.com/users/react-bootstrap/events{/privacy}","received_events_url":"https://api.github.com/users/react-bootstrap/received_events","type":"Organization","site_admin":false},"repo":{"id":15480067,"name":"react-bootstrap","full_name":"react-bootstrap/react-bootstrap","owner":{"login":"react-bootstrap","id":6853419,"avatar_url":"https://avatars.githubusercontent.com/u/6853419?v=3","gravatar_id":"","url":"https://api.github.com/users/react-bootstrap","html_url":"https://github.com/react-bootstrap","followers_url":"https://api.github.com/users/react-bootstrap/followers","following_url":"https://api.github.com/users/react-bootstrap/following{/other_user}","gists_url":"https://api.github.com/users/react-bootstrap/gists{/gist_id}","starred_url":"https://api.github.com/users/react-bootstrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/react-bootstrap/subscriptions","organizations_url":"https://api.github.com/users/react-bootstrap/orgs","repos_url":"https://api.github.com/users/react-bootstrap/repos","events_url":"https://api.github.com/users/react-bootstrap/events{/privacy}","received_events_url":"https://api.github.com/users/react-bootstrap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/react-bootstrap/react-bootstrap","description":"Bootstrap 3 components built with React","fork":false,"url":"https://api.github.com/repos/react-bootstrap/react-bootstrap","forks_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/forks","keys_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/teams","hooks_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/hooks","issue_events_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/events{/number}","events_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/events","assignees_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/assignees{/user}","branches_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/branches{/branch}","tags_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/tags","blobs_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/languages","stargazers_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/stargazers","contributors_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/contributors","subscribers_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/subscribers","subscription_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/subscription","commits_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/contents/{+path}","compare_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/merges","archive_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/downloads","issues_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues{/number}","pulls_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/labels{/name}","releases_url":"https://api.github.com/repos/react-bootstrap/react-bootstrap/releases{/id}","created_at":"2013-12-27T19:06:07Z","updated_at":"2015-07-29T10:45:52Z","pushed_at":"2015-07-29T10:35:31Z","git_url":"git://github.com/react-bootstrap/react-bootstrap.git","ssh_url":"git@github.com:react-bootstrap/react-bootstrap.git","clone_url":"https://github.com/react-bootstrap/react-bootstrap.git","svn_url":"https://github.com/react-bootstrap/react-bootstrap","homepage":"http://react-bootstrap.github.io/","size":9897,"stargazers_count":2905,"watchers_count":2905,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":471,"mirror_url":null,"open_issues_count":71,"forks":471,"open_issues":71,"watchers":2905,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079"},"html":{"href":"https://github.com/react-bootstrap/react-bootstrap/pull/1079"},"issue":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/1079"},"comments":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/issues/1079/comments"},"review_comments":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079/comments"},"review_comment":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/pulls/1079/commits"},"statuses":{"href":"https://api.github.com/repos/react-bootstrap/react-bootstrap/statuses/f9d8b1e7b1ec1501818c5920dcdf8ccd117eca49"}}}}