{"action":"created","comment":{"url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/comments/88782055","pull_request_review_id":9347661,"id":88782055,"diff_hunk":"@@ -131,6 +140,30 @@ export default class JSONNestedNode extends React.Component {\n     );\n     const stylingArgs = [keyPath, nodeType, expanded, expandable];\n \n+    const handleClick = () => {\n+      const newState = !expanded;\n+\n+      if (this.props.onNodeExpansionChanging) {\n+        this.props.onNodeExpansionChanging(\n+          this.props.keyPath,\n+          this.props.data,\n+          this.props.level,\n+          newState);\n+      }\n+\n+      this.setState(\n+        { expanded: newState },\n+        () => {\n+          if (this.props.onNodeExpansionChanged) {\n+            this.props.onNodeExpansionChanged(\n+              this.props.keyPath,\n+              this.props.data,\n+              this.props.level,\n+              this.state.expanded);\n+          }\n+        });\n+    };\n+","path":"src/JSONNestedNode.js","position":63,"original_position":63,"commit_id":"1cff71b9f22ba2ae53ecb0a3d37b23e35a145f0b","original_commit_id":"1cff71b9f22ba2ae53ecb0a3d37b23e35a145f0b","user":{"login":"alexkuz","id":790659,"avatar_url":"https://avatars.githubusercontent.com/u/790659?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkuz","html_url":"https://github.com/alexkuz","followers_url":"https://api.github.com/users/alexkuz/followers","following_url":"https://api.github.com/users/alexkuz/following{/other_user}","gists_url":"https://api.github.com/users/alexkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkuz/subscriptions","organizations_url":"https://api.github.com/users/alexkuz/orgs","repos_url":"https://api.github.com/users/alexkuz/repos","events_url":"https://api.github.com/users/alexkuz/events{/privacy}","received_events_url":"https://api.github.com/users/alexkuz/received_events","type":"User","site_admin":false},"body":"After https://github.com/alexkuz/react-json-tree/pull/61 it's better to move this back to class property.","created_at":"2016-11-19T16:06:42Z","updated_at":"2016-11-19T16:07:13Z","html_url":"https://github.com/alexkuz/react-json-tree/pull/57#discussion_r88782055","pull_request_url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/comments/88782055"},"html":{"href":"https://github.com/alexkuz/react-json-tree/pull/57#discussion_r88782055"},"pull_request":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57","id":91411138,"html_url":"https://github.com/alexkuz/react-json-tree/pull/57","diff_url":"https://github.com/alexkuz/react-json-tree/pull/57.diff","patch_url":"https://github.com/alexkuz/react-json-tree/pull/57.patch","issue_url":"https://api.github.com/repos/alexkuz/react-json-tree/issues/57","number":57,"state":"open","locked":false,"title":"Adds notification handler for node expansion","user":{"login":"philliphoff","id":6402946,"avatar_url":"https://avatars.githubusercontent.com/u/6402946?v=3","gravatar_id":"","url":"https://api.github.com/users/philliphoff","html_url":"https://github.com/philliphoff","followers_url":"https://api.github.com/users/philliphoff/followers","following_url":"https://api.github.com/users/philliphoff/following{/other_user}","gists_url":"https://api.github.com/users/philliphoff/gists{/gist_id}","starred_url":"https://api.github.com/users/philliphoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philliphoff/subscriptions","organizations_url":"https://api.github.com/users/philliphoff/orgs","repos_url":"https://api.github.com/users/philliphoff/repos","events_url":"https://api.github.com/users/philliphoff/events{/privacy}","received_events_url":"https://api.github.com/users/philliphoff/received_events","type":"User","site_admin":false},"body":"Adds the optional property `onNodeExpansionChanged(keyName, data, level, expanded)` to `JSONNestedNode`.  This allows applications to be notified when a node is expanded or collapsed.  This can be used, for example, in conjunction with `shouldExpandNode` to preserve the expansion state of the JSON tree across views.\n","created_at":"2016-10-28T16:24:52Z","updated_at":"2016-11-19T16:07:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64c502222881f1a04c6540bfd3cbfdeec1ce0738","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57/commits","review_comments_url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57/comments","review_comment_url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexkuz/react-json-tree/issues/57/comments","statuses_url":"https://api.github.com/repos/alexkuz/react-json-tree/statuses/1cff71b9f22ba2ae53ecb0a3d37b23e35a145f0b","head":{"label":"philliphoff:philliphoff-notifyexpansion","ref":"philliphoff-notifyexpansion","sha":"1cff71b9f22ba2ae53ecb0a3d37b23e35a145f0b","user":{"login":"philliphoff","id":6402946,"avatar_url":"https://avatars.githubusercontent.com/u/6402946?v=3","gravatar_id":"","url":"https://api.github.com/users/philliphoff","html_url":"https://github.com/philliphoff","followers_url":"https://api.github.com/users/philliphoff/followers","following_url":"https://api.github.com/users/philliphoff/following{/other_user}","gists_url":"https://api.github.com/users/philliphoff/gists{/gist_id}","starred_url":"https://api.github.com/users/philliphoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philliphoff/subscriptions","organizations_url":"https://api.github.com/users/philliphoff/orgs","repos_url":"https://api.github.com/users/philliphoff/repos","events_url":"https://api.github.com/users/philliphoff/events{/privacy}","received_events_url":"https://api.github.com/users/philliphoff/received_events","type":"User","site_admin":false},"repo":{"id":72055279,"name":"react-json-tree","full_name":"philliphoff/react-json-tree","owner":{"login":"philliphoff","id":6402946,"avatar_url":"https://avatars.githubusercontent.com/u/6402946?v=3","gravatar_id":"","url":"https://api.github.com/users/philliphoff","html_url":"https://github.com/philliphoff","followers_url":"https://api.github.com/users/philliphoff/followers","following_url":"https://api.github.com/users/philliphoff/following{/other_user}","gists_url":"https://api.github.com/users/philliphoff/gists{/gist_id}","starred_url":"https://api.github.com/users/philliphoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philliphoff/subscriptions","organizations_url":"https://api.github.com/users/philliphoff/orgs","repos_url":"https://api.github.com/users/philliphoff/repos","events_url":"https://api.github.com/users/philliphoff/events{/privacy}","received_events_url":"https://api.github.com/users/philliphoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philliphoff/react-json-tree","description":"React JSON Viewer Component, Extracted from redux-devtools","fork":true,"url":"https://api.github.com/repos/philliphoff/react-json-tree","forks_url":"https://api.github.com/repos/philliphoff/react-json-tree/forks","keys_url":"https://api.github.com/repos/philliphoff/react-json-tree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philliphoff/react-json-tree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philliphoff/react-json-tree/teams","hooks_url":"https://api.github.com/repos/philliphoff/react-json-tree/hooks","issue_events_url":"https://api.github.com/repos/philliphoff/react-json-tree/issues/events{/number}","events_url":"https://api.github.com/repos/philliphoff/react-json-tree/events","assignees_url":"https://api.github.com/repos/philliphoff/react-json-tree/assignees{/user}","branches_url":"https://api.github.com/repos/philliphoff/react-json-tree/branches{/branch}","tags_url":"https://api.github.com/repos/philliphoff/react-json-tree/tags","blobs_url":"https://api.github.com/repos/philliphoff/react-json-tree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philliphoff/react-json-tree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philliphoff/react-json-tree/git/refs{/sha}","trees_url":"https://api.github.com/repos/philliphoff/react-json-tree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philliphoff/react-json-tree/statuses/{sha}","languages_url":"https://api.github.com/repos/philliphoff/react-json-tree/languages","stargazers_url":"https://api.github.com/repos/philliphoff/react-json-tree/stargazers","contributors_url":"https://api.github.com/repos/philliphoff/react-json-tree/contributors","subscribers_url":"https://api.github.com/repos/philliphoff/react-json-tree/subscribers","subscription_url":"https://api.github.com/repos/philliphoff/react-json-tree/subscription","commits_url":"https://api.github.com/repos/philliphoff/react-json-tree/commits{/sha}","git_commits_url":"https://api.github.com/repos/philliphoff/react-json-tree/git/commits{/sha}","comments_url":"https://api.github.com/repos/philliphoff/react-json-tree/comments{/number}","issue_comment_url":"https://api.github.com/repos/philliphoff/react-json-tree/issues/comments{/number}","contents_url":"https://api.github.com/repos/philliphoff/react-json-tree/contents/{+path}","compare_url":"https://api.github.com/repos/philliphoff/react-json-tree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philliphoff/react-json-tree/merges","archive_url":"https://api.github.com/repos/philliphoff/react-json-tree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philliphoff/react-json-tree/downloads","issues_url":"https://api.github.com/repos/philliphoff/react-json-tree/issues{/number}","pulls_url":"https://api.github.com/repos/philliphoff/react-json-tree/pulls{/number}","milestones_url":"https://api.github.com/repos/philliphoff/react-json-tree/milestones{/number}","notifications_url":"https://api.github.com/repos/philliphoff/react-json-tree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philliphoff/react-json-tree/labels{/name}","releases_url":"https://api.github.com/repos/philliphoff/react-json-tree/releases{/id}","deployments_url":"https://api.github.com/repos/philliphoff/react-json-tree/deployments","created_at":"2016-10-27T00:12:06Z","updated_at":"2016-10-27T00:12:07Z","pushed_at":"2016-11-04T20:15:10Z","git_url":"git://github.com/philliphoff/react-json-tree.git","ssh_url":"git@github.com:philliphoff/react-json-tree.git","clone_url":"https://github.com/philliphoff/react-json-tree.git","svn_url":"https://github.com/philliphoff/react-json-tree","homepage":null,"size":134,"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":"alexkuz:master","ref":"master","sha":"fa35d0ae27d16aad6e00f7ae7c3cac2d9402b7ed","user":{"login":"alexkuz","id":790659,"avatar_url":"https://avatars.githubusercontent.com/u/790659?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkuz","html_url":"https://github.com/alexkuz","followers_url":"https://api.github.com/users/alexkuz/followers","following_url":"https://api.github.com/users/alexkuz/following{/other_user}","gists_url":"https://api.github.com/users/alexkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkuz/subscriptions","organizations_url":"https://api.github.com/users/alexkuz/orgs","repos_url":"https://api.github.com/users/alexkuz/repos","events_url":"https://api.github.com/users/alexkuz/events{/privacy}","received_events_url":"https://api.github.com/users/alexkuz/received_events","type":"User","site_admin":false},"repo":{"id":41331693,"name":"react-json-tree","full_name":"alexkuz/react-json-tree","owner":{"login":"alexkuz","id":790659,"avatar_url":"https://avatars.githubusercontent.com/u/790659?v=3","gravatar_id":"","url":"https://api.github.com/users/alexkuz","html_url":"https://github.com/alexkuz","followers_url":"https://api.github.com/users/alexkuz/followers","following_url":"https://api.github.com/users/alexkuz/following{/other_user}","gists_url":"https://api.github.com/users/alexkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkuz/subscriptions","organizations_url":"https://api.github.com/users/alexkuz/orgs","repos_url":"https://api.github.com/users/alexkuz/repos","events_url":"https://api.github.com/users/alexkuz/events{/privacy}","received_events_url":"https://api.github.com/users/alexkuz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexkuz/react-json-tree","description":"React JSON Viewer Component, Extracted from redux-devtools","fork":false,"url":"https://api.github.com/repos/alexkuz/react-json-tree","forks_url":"https://api.github.com/repos/alexkuz/react-json-tree/forks","keys_url":"https://api.github.com/repos/alexkuz/react-json-tree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexkuz/react-json-tree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexkuz/react-json-tree/teams","hooks_url":"https://api.github.com/repos/alexkuz/react-json-tree/hooks","issue_events_url":"https://api.github.com/repos/alexkuz/react-json-tree/issues/events{/number}","events_url":"https://api.github.com/repos/alexkuz/react-json-tree/events","assignees_url":"https://api.github.com/repos/alexkuz/react-json-tree/assignees{/user}","branches_url":"https://api.github.com/repos/alexkuz/react-json-tree/branches{/branch}","tags_url":"https://api.github.com/repos/alexkuz/react-json-tree/tags","blobs_url":"https://api.github.com/repos/alexkuz/react-json-tree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexkuz/react-json-tree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexkuz/react-json-tree/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexkuz/react-json-tree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexkuz/react-json-tree/statuses/{sha}","languages_url":"https://api.github.com/repos/alexkuz/react-json-tree/languages","stargazers_url":"https://api.github.com/repos/alexkuz/react-json-tree/stargazers","contributors_url":"https://api.github.com/repos/alexkuz/react-json-tree/contributors","subscribers_url":"https://api.github.com/repos/alexkuz/react-json-tree/subscribers","subscription_url":"https://api.github.com/repos/alexkuz/react-json-tree/subscription","commits_url":"https://api.github.com/repos/alexkuz/react-json-tree/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexkuz/react-json-tree/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexkuz/react-json-tree/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexkuz/react-json-tree/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexkuz/react-json-tree/contents/{+path}","compare_url":"https://api.github.com/repos/alexkuz/react-json-tree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexkuz/react-json-tree/merges","archive_url":"https://api.github.com/repos/alexkuz/react-json-tree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexkuz/react-json-tree/downloads","issues_url":"https://api.github.com/repos/alexkuz/react-json-tree/issues{/number}","pulls_url":"https://api.github.com/repos/alexkuz/react-json-tree/pulls{/number}","milestones_url":"https://api.github.com/repos/alexkuz/react-json-tree/milestones{/number}","notifications_url":"https://api.github.com/repos/alexkuz/react-json-tree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexkuz/react-json-tree/labels{/name}","releases_url":"https://api.github.com/repos/alexkuz/react-json-tree/releases{/id}","deployments_url":"https://api.github.com/repos/alexkuz/react-json-tree/deployments","created_at":"2015-08-24T23:15:22Z","updated_at":"2016-11-17T10:14:53Z","pushed_at":"2016-11-19T15:36:30Z","git_url":"git://github.com/alexkuz/react-json-tree.git","ssh_url":"git@github.com:alexkuz/react-json-tree.git","clone_url":"https://github.com/alexkuz/react-json-tree.git","svn_url":"https://github.com/alexkuz/react-json-tree","homepage":null,"size":146,"stargazers_count":379,"watchers_count":379,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":9,"forks":39,"open_issues":9,"watchers":379,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57"},"html":{"href":"https://github.com/alexkuz/react-json-tree/pull/57"},"issue":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/issues/57"},"comments":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/alexkuz/react-json-tree/statuses/1cff71b9f22ba2ae53ecb0a3d37b23e35a145f0b"}}}}
{"actor":{"display_login":"alexkuz"}}