{"action":"created","comment":{"url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/comments/59864856","id":59864856,"diff_hunk":"@@ -21,11 +21,11 @@ function addClickOutsideListener(Component) {\n     },\n \n     render: function render() {\n-      return React.createElement(Component, objectAssign({\n+      return React.createElement(Component, objectAssign({}, this.props, {","path":"decorator.js","position":5,"original_position":5,"commit_id":"6b7755475c9c945d6a9a413b41b81a148ca80738","original_commit_id":"6b7755475c9c945d6a9a413b41b81a148ca80738","user":{"login":"samsch","id":10436679,"avatar_url":"https://avatars.githubusercontent.com/u/10436679?v=3","gravatar_id":"","url":"https://api.github.com/users/samsch","html_url":"https://github.com/samsch","followers_url":"https://api.github.com/users/samsch/followers","following_url":"https://api.github.com/users/samsch/following{/other_user}","gists_url":"https://api.github.com/users/samsch/gists{/gist_id}","starred_url":"https://api.github.com/users/samsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsch/subscriptions","organizations_url":"https://api.github.com/users/samsch/orgs","repos_url":"https://api.github.com/users/samsch/repos","events_url":"https://api.github.com/users/samsch/events{/privacy}","received_events_url":"https://api.github.com/users/samsch/received_events","type":"User","site_admin":false},"body":"The enableOnClickOutside and disableOnClickOutside methods need to be added by the HOC to the properties passed to the component, or the component won't have access to them. If you replaced lines 24-28 with your snippet, then you wouldn't be able to enable/disable listening from the wrapped component.\r\n\r\nUnless I'm misunderstanding your question?","created_at":"2016-04-15T12:11:09Z","updated_at":"2016-04-15T12:11:09Z","html_url":"https://github.com/Pomax/react-onclickoutside/pull/77#discussion_r59864856","pull_request_url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/comments/59864856"},"html":{"href":"https://github.com/Pomax/react-onclickoutside/pull/77#discussion_r59864856"},"pull_request":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77","id":65623754,"html_url":"https://github.com/Pomax/react-onclickoutside/pull/77","diff_url":"https://github.com/Pomax/react-onclickoutside/pull/77.diff","patch_url":"https://github.com/Pomax/react-onclickoutside/pull/77.patch","issue_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/77","number":77,"state":"open","locked":false,"title":"Changed HOC/decorator to favor enable/disableClickOutside over this.props, rather than visa-versa.","user":{"login":"samsch","id":10436679,"avatar_url":"https://avatars.githubusercontent.com/u/10436679?v=3","gravatar_id":"","url":"https://api.github.com/users/samsch","html_url":"https://github.com/samsch","followers_url":"https://api.github.com/users/samsch/followers","following_url":"https://api.github.com/users/samsch/following{/other_user}","gists_url":"https://api.github.com/users/samsch/gists{/gist_id}","starred_url":"https://api.github.com/users/samsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsch/subscriptions","organizations_url":"https://api.github.com/users/samsch/orgs","repos_url":"https://api.github.com/users/samsch/repos","events_url":"https://api.github.com/users/samsch/events{/privacy}","received_events_url":"https://api.github.com/users/samsch/received_events","type":"User","site_admin":false},"body":"Fix for #65\r\nPrior to this change, passing `enableOnClickOutside` or `disableOnClickOutside` as props to the HOC(component) will override the functions of the same name passed by the HOC to the wrapped component, which is not consistent with how the mixin works.\r\n\r\nWith this change, the internal function properties will now supersede the properties from the parent, allowing the component to enable/disable listening. Technically, this is a breaking change, but the documentation would seem to suggest it should work like this (the same as the mixin), rather than how it does currently.","created_at":"2016-04-07T12:46:51Z","updated_at":"2016-04-15T12:11:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4480d211a2657bf7221d06116dde28ed94b1c233","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77/commits","review_comments_url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77/comments","review_comment_url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/77/comments","statuses_url":"https://api.github.com/repos/Pomax/react-onclickoutside/statuses/6b7755475c9c945d6a9a413b41b81a148ca80738","head":{"label":"samsch:patch-2","ref":"patch-2","sha":"6b7755475c9c945d6a9a413b41b81a148ca80738","user":{"login":"samsch","id":10436679,"avatar_url":"https://avatars.githubusercontent.com/u/10436679?v=3","gravatar_id":"","url":"https://api.github.com/users/samsch","html_url":"https://github.com/samsch","followers_url":"https://api.github.com/users/samsch/followers","following_url":"https://api.github.com/users/samsch/following{/other_user}","gists_url":"https://api.github.com/users/samsch/gists{/gist_id}","starred_url":"https://api.github.com/users/samsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsch/subscriptions","organizations_url":"https://api.github.com/users/samsch/orgs","repos_url":"https://api.github.com/users/samsch/repos","events_url":"https://api.github.com/users/samsch/events{/privacy}","received_events_url":"https://api.github.com/users/samsch/received_events","type":"User","site_admin":false},"repo":{"id":55628509,"name":"react-onclickoutside","full_name":"samsch/react-onclickoutside","owner":{"login":"samsch","id":10436679,"avatar_url":"https://avatars.githubusercontent.com/u/10436679?v=3","gravatar_id":"","url":"https://api.github.com/users/samsch","html_url":"https://github.com/samsch","followers_url":"https://api.github.com/users/samsch/followers","following_url":"https://api.github.com/users/samsch/following{/other_user}","gists_url":"https://api.github.com/users/samsch/gists{/gist_id}","starred_url":"https://api.github.com/users/samsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsch/subscriptions","organizations_url":"https://api.github.com/users/samsch/orgs","repos_url":"https://api.github.com/users/samsch/repos","events_url":"https://api.github.com/users/samsch/events{/privacy}","received_events_url":"https://api.github.com/users/samsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samsch/react-onclickoutside","description":"An onClickOutside mixin for React components","fork":true,"url":"https://api.github.com/repos/samsch/react-onclickoutside","forks_url":"https://api.github.com/repos/samsch/react-onclickoutside/forks","keys_url":"https://api.github.com/repos/samsch/react-onclickoutside/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samsch/react-onclickoutside/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samsch/react-onclickoutside/teams","hooks_url":"https://api.github.com/repos/samsch/react-onclickoutside/hooks","issue_events_url":"https://api.github.com/repos/samsch/react-onclickoutside/issues/events{/number}","events_url":"https://api.github.com/repos/samsch/react-onclickoutside/events","assignees_url":"https://api.github.com/repos/samsch/react-onclickoutside/assignees{/user}","branches_url":"https://api.github.com/repos/samsch/react-onclickoutside/branches{/branch}","tags_url":"https://api.github.com/repos/samsch/react-onclickoutside/tags","blobs_url":"https://api.github.com/repos/samsch/react-onclickoutside/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samsch/react-onclickoutside/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samsch/react-onclickoutside/git/refs{/sha}","trees_url":"https://api.github.com/repos/samsch/react-onclickoutside/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samsch/react-onclickoutside/statuses/{sha}","languages_url":"https://api.github.com/repos/samsch/react-onclickoutside/languages","stargazers_url":"https://api.github.com/repos/samsch/react-onclickoutside/stargazers","contributors_url":"https://api.github.com/repos/samsch/react-onclickoutside/contributors","subscribers_url":"https://api.github.com/repos/samsch/react-onclickoutside/subscribers","subscription_url":"https://api.github.com/repos/samsch/react-onclickoutside/subscription","commits_url":"https://api.github.com/repos/samsch/react-onclickoutside/commits{/sha}","git_commits_url":"https://api.github.com/repos/samsch/react-onclickoutside/git/commits{/sha}","comments_url":"https://api.github.com/repos/samsch/react-onclickoutside/comments{/number}","issue_comment_url":"https://api.github.com/repos/samsch/react-onclickoutside/issues/comments{/number}","contents_url":"https://api.github.com/repos/samsch/react-onclickoutside/contents/{+path}","compare_url":"https://api.github.com/repos/samsch/react-onclickoutside/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samsch/react-onclickoutside/merges","archive_url":"https://api.github.com/repos/samsch/react-onclickoutside/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samsch/react-onclickoutside/downloads","issues_url":"https://api.github.com/repos/samsch/react-onclickoutside/issues{/number}","pulls_url":"https://api.github.com/repos/samsch/react-onclickoutside/pulls{/number}","milestones_url":"https://api.github.com/repos/samsch/react-onclickoutside/milestones{/number}","notifications_url":"https://api.github.com/repos/samsch/react-onclickoutside/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samsch/react-onclickoutside/labels{/name}","releases_url":"https://api.github.com/repos/samsch/react-onclickoutside/releases{/id}","deployments_url":"https://api.github.com/repos/samsch/react-onclickoutside/deployments","created_at":"2016-04-06T17:56:21Z","updated_at":"2016-04-06T17:56:21Z","pushed_at":"2016-04-07T12:36:19Z","git_url":"git://github.com/samsch/react-onclickoutside.git","ssh_url":"git@github.com:samsch/react-onclickoutside.git","clone_url":"https://github.com/samsch/react-onclickoutside.git","svn_url":"https://github.com/samsch/react-onclickoutside","homepage":null,"size":53,"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":"Pomax:master","ref":"master","sha":"bf894d4a6fff2cb6e837f6639c23365608a93eb2","user":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"repo":{"id":28877410,"name":"react-onclickoutside","full_name":"Pomax/react-onclickoutside","owner":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pomax/react-onclickoutside","description":"An onClickOutside mixin for React components","fork":false,"url":"https://api.github.com/repos/Pomax/react-onclickoutside","forks_url":"https://api.github.com/repos/Pomax/react-onclickoutside/forks","keys_url":"https://api.github.com/repos/Pomax/react-onclickoutside/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pomax/react-onclickoutside/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pomax/react-onclickoutside/teams","hooks_url":"https://api.github.com/repos/Pomax/react-onclickoutside/hooks","issue_events_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/events{/number}","events_url":"https://api.github.com/repos/Pomax/react-onclickoutside/events","assignees_url":"https://api.github.com/repos/Pomax/react-onclickoutside/assignees{/user}","branches_url":"https://api.github.com/repos/Pomax/react-onclickoutside/branches{/branch}","tags_url":"https://api.github.com/repos/Pomax/react-onclickoutside/tags","blobs_url":"https://api.github.com/repos/Pomax/react-onclickoutside/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pomax/react-onclickoutside/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pomax/react-onclickoutside/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pomax/react-onclickoutside/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pomax/react-onclickoutside/statuses/{sha}","languages_url":"https://api.github.com/repos/Pomax/react-onclickoutside/languages","stargazers_url":"https://api.github.com/repos/Pomax/react-onclickoutside/stargazers","contributors_url":"https://api.github.com/repos/Pomax/react-onclickoutside/contributors","subscribers_url":"https://api.github.com/repos/Pomax/react-onclickoutside/subscribers","subscription_url":"https://api.github.com/repos/Pomax/react-onclickoutside/subscription","commits_url":"https://api.github.com/repos/Pomax/react-onclickoutside/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pomax/react-onclickoutside/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pomax/react-onclickoutside/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pomax/react-onclickoutside/contents/{+path}","compare_url":"https://api.github.com/repos/Pomax/react-onclickoutside/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pomax/react-onclickoutside/merges","archive_url":"https://api.github.com/repos/Pomax/react-onclickoutside/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pomax/react-onclickoutside/downloads","issues_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues{/number}","pulls_url":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls{/number}","milestones_url":"https://api.github.com/repos/Pomax/react-onclickoutside/milestones{/number}","notifications_url":"https://api.github.com/repos/Pomax/react-onclickoutside/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pomax/react-onclickoutside/labels{/name}","releases_url":"https://api.github.com/repos/Pomax/react-onclickoutside/releases{/id}","deployments_url":"https://api.github.com/repos/Pomax/react-onclickoutside/deployments","created_at":"2015-01-06T18:36:37Z","updated_at":"2016-04-13T12:27:44Z","pushed_at":"2016-04-14T21:20:06Z","git_url":"git://github.com/Pomax/react-onclickoutside.git","ssh_url":"git@github.com:Pomax/react-onclickoutside.git","clone_url":"https://github.com/Pomax/react-onclickoutside.git","svn_url":"https://github.com/Pomax/react-onclickoutside","homepage":null,"size":81,"stargazers_count":213,"watchers_count":213,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":11,"forks":61,"open_issues":11,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77"},"html":{"href":"https://github.com/Pomax/react-onclickoutside/pull/77"},"issue":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/77"},"comments":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/Pomax/react-onclickoutside/statuses/6b7755475c9c945d6a9a413b41b81a148ca80738"}}}}