{"action":"created","comment":{"url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/comments/180280447","pull_request_review_id":110673720,"id":180280447,"diff_hunk":"@@ -0,0 +1,49 @@\n+import * as React from \"react\";\n+import Parser from \"../utils/Parser\";\n+import RDTableHeader from \"./RDTableHeader\";\n+import RDTableBody from \"./RDTableBody\";\n+import {\n+  RDTableProtocol,\n+  RDTableHeaderProtocol,\n+  RDTableDataProtocol\n+} from \"./contracts/RDTableContract\";\n+import {\n+  instanceRDTableParsableSimpleProperty,\n+  RDTableSimplePropertyProtocol\n+} from \"./contracts/properties/RDTableSimplePropertyContract\";\n+\n+export default class RDTable extends React.Component<RDTableProtocol> {","path":"src/components/RDTable.tsx","position":15,"original_position":15,"commit_id":"576c5849f4c1bf2e5f3f906bfccc4f53a922379b","original_commit_id":"576c5849f4c1bf2e5f3f906bfccc4f53a922379b","user":{"login":"trungdq88","id":4214509,"avatar_url":"https://avatars3.githubusercontent.com/u/4214509?v=4","gravatar_id":"","url":"https://api.github.com/users/trungdq88","html_url":"https://github.com/trungdq88","followers_url":"https://api.github.com/users/trungdq88/followers","following_url":"https://api.github.com/users/trungdq88/following{/other_user}","gists_url":"https://api.github.com/users/trungdq88/gists{/gist_id}","starred_url":"https://api.github.com/users/trungdq88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trungdq88/subscriptions","organizations_url":"https://api.github.com/users/trungdq88/orgs","repos_url":"https://api.github.com/users/trungdq88/repos","events_url":"https://api.github.com/users/trungdq88/events{/privacy}","received_events_url":"https://api.github.com/users/trungdq88/received_events","type":"User","site_admin":false},"body":"We must have a black-box test for `RDTable`. Must have cases:\r\n- [ ] happy case (provided as example in requirement)\r\n- [ ] empty `data`\r\n- [ ] empty `fields`\r\n- [ ] `fields` contains a field name that do not exist in `data`\r\n","created_at":"2018-04-10T02:16:12Z","updated_at":"2018-04-10T02:16:12Z","html_url":"https://github.com/anhtrantuan/react-data-table/pull/2#discussion_r180280447","pull_request_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/comments/180280447"},"html":{"href":"https://github.com/anhtrantuan/react-data-table/pull/2#discussion_r180280447"},"pull_request":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2","id":180382285,"html_url":"https://github.com/anhtrantuan/react-data-table/pull/2","diff_url":"https://github.com/anhtrantuan/react-data-table/pull/2.diff","patch_url":"https://github.com/anhtrantuan/react-data-table/pull/2.patch","issue_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/2","number":2,"state":"open","locked":false,"title":"Implement simple data table","user":{"login":"phongdoduy","id":25846528,"avatar_url":"https://avatars3.githubusercontent.com/u/25846528?v=4","gravatar_id":"","url":"https://api.github.com/users/phongdoduy","html_url":"https://github.com/phongdoduy","followers_url":"https://api.github.com/users/phongdoduy/followers","following_url":"https://api.github.com/users/phongdoduy/following{/other_user}","gists_url":"https://api.github.com/users/phongdoduy/gists{/gist_id}","starred_url":"https://api.github.com/users/phongdoduy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phongdoduy/subscriptions","organizations_url":"https://api.github.com/users/phongdoduy/orgs","repos_url":"https://api.github.com/users/phongdoduy/repos","events_url":"https://api.github.com/users/phongdoduy/events{/privacy}","received_events_url":"https://api.github.com/users/phongdoduy/received_events","type":"User","site_admin":false},"body":"## WIP Checklist\r\n\r\n- [ ] Tests\r\n- [ ] Styling\r\n- [ ] Assertions\r\n- [ ] Demo page\r\n\r\n## Why is this change necessary?\r\nImplement the simple data table:\r\n```jsx\r\n<DataTable\r\n  data={[\r\n    { name: 'Trung', age: 123 },\r\n    { name: 'Quang', age: 567 },\r\n  ]}\r\n  properties={[\r\n    ['Name', 'name'],\r\n    ['Age', 'age'],\r\n  ]}\r\n/>\r\n```\r\n\r\nas\r\n\r\nName | Age\r\n-----|----\r\nTrung|123\r\nQuang|567\r\n\r\n## How does it address the issue?\r\n- Implement the protocols:\r\n    * `ParsableProperty` that can be scalable by declaring the `attributeNames`.\r\n    * `ParsableSimpleProperty` that extends from `ParsableProperty` to include more attributes.\r\n    * `SimpleProperty` that includes simple attributes.\r\n- Implement the generic `Parser` that receive the `Array<string>` as param and parse to `Property`.\r\n- Implement the contracts for `TableHeader` and `TableBody`.\r\n\r\n## Related PRs\r\n\r\n- #1 : Init project with TS, this PR should be reviewed and merged first.\r\n\r\n## Screenshots\r\n<img width=\"94\" alt=\"screen shot 2018-04-10 at 12 53 13 am\" src=\"https://user-images.githubusercontent.com/25846528/38513819-98c0361e-3c59-11e8-84d9-f6df2223a3ed.png\">\r\n\r\n☝️ **Simple table without proper styles**\r\n\r\n","created_at":"2018-04-09T17:56:54Z","updated_at":"2018-04-10T02:16:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0142747871e5f867180e27b8136d7812af822cf7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"anhtrantuan","id":2020180,"avatar_url":"https://avatars1.githubusercontent.com/u/2020180?v=4","gravatar_id":"","url":"https://api.github.com/users/anhtrantuan","html_url":"https://github.com/anhtrantuan","followers_url":"https://api.github.com/users/anhtrantuan/followers","following_url":"https://api.github.com/users/anhtrantuan/following{/other_user}","gists_url":"https://api.github.com/users/anhtrantuan/gists{/gist_id}","starred_url":"https://api.github.com/users/anhtrantuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhtrantuan/subscriptions","organizations_url":"https://api.github.com/users/anhtrantuan/orgs","repos_url":"https://api.github.com/users/anhtrantuan/repos","events_url":"https://api.github.com/users/anhtrantuan/events{/privacy}","received_events_url":"https://api.github.com/users/anhtrantuan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":858629284,"url":"https://api.github.com/repos/anhtrantuan/react-data-table/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":{"url":"https://api.github.com/repos/anhtrantuan/react-data-table/milestones/1","html_url":"https://github.com/anhtrantuan/react-data-table/milestone/1","labels_url":"https://api.github.com/repos/anhtrantuan/react-data-table/milestones/1/labels","id":3246832,"number":1,"title":"v0.0.1","description":"Release the simplest version v0.0.1 of ReactDataTable.","creator":{"login":"phongdoduy","id":25846528,"avatar_url":"https://avatars3.githubusercontent.com/u/25846528?v=4","gravatar_id":"","url":"https://api.github.com/users/phongdoduy","html_url":"https://github.com/phongdoduy","followers_url":"https://api.github.com/users/phongdoduy/followers","following_url":"https://api.github.com/users/phongdoduy/following{/other_user}","gists_url":"https://api.github.com/users/phongdoduy/gists{/gist_id}","starred_url":"https://api.github.com/users/phongdoduy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phongdoduy/subscriptions","organizations_url":"https://api.github.com/users/phongdoduy/orgs","repos_url":"https://api.github.com/users/phongdoduy/repos","events_url":"https://api.github.com/users/phongdoduy/events{/privacy}","received_events_url":"https://api.github.com/users/phongdoduy/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-04-06T03:53:48Z","updated_at":"2018-04-09T17:59:06Z","due_on":"2018-04-17T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2/commits","review_comments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2/comments","review_comment_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/2/comments","statuses_url":"https://api.github.com/repos/anhtrantuan/react-data-table/statuses/576c5849f4c1bf2e5f3f906bfccc4f53a922379b","head":{"label":"anhtrantuan:phongdo/simplest-data-table","ref":"phongdo/simplest-data-table","sha":"576c5849f4c1bf2e5f3f906bfccc4f53a922379b","user":{"login":"anhtrantuan","id":2020180,"avatar_url":"https://avatars1.githubusercontent.com/u/2020180?v=4","gravatar_id":"","url":"https://api.github.com/users/anhtrantuan","html_url":"https://github.com/anhtrantuan","followers_url":"https://api.github.com/users/anhtrantuan/followers","following_url":"https://api.github.com/users/anhtrantuan/following{/other_user}","gists_url":"https://api.github.com/users/anhtrantuan/gists{/gist_id}","starred_url":"https://api.github.com/users/anhtrantuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhtrantuan/subscriptions","organizations_url":"https://api.github.com/users/anhtrantuan/orgs","repos_url":"https://api.github.com/users/anhtrantuan/repos","events_url":"https://api.github.com/users/anhtrantuan/events{/privacy}","received_events_url":"https://api.github.com/users/anhtrantuan/received_events","type":"User","site_admin":false},"repo":{"id":124172494,"name":"react-data-table","full_name":"anhtrantuan/react-data-table","owner":{"login":"anhtrantuan","id":2020180,"avatar_url":"https://avatars1.githubusercontent.com/u/2020180?v=4","gravatar_id":"","url":"https://api.github.com/users/anhtrantuan","html_url":"https://github.com/anhtrantuan","followers_url":"https://api.github.com/users/anhtrantuan/followers","following_url":"https://api.github.com/users/anhtrantuan/following{/other_user}","gists_url":"https://api.github.com/users/anhtrantuan/gists{/gist_id}","starred_url":"https://api.github.com/users/anhtrantuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhtrantuan/subscriptions","organizations_url":"https://api.github.com/users/anhtrantuan/orgs","repos_url":"https://api.github.com/users/anhtrantuan/repos","events_url":"https://api.github.com/users/anhtrantuan/events{/privacy}","received_events_url":"https://api.github.com/users/anhtrantuan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anhtrantuan/react-data-table","description":"Data table for React.JS","fork":false,"url":"https://api.github.com/repos/anhtrantuan/react-data-table","forks_url":"https://api.github.com/repos/anhtrantuan/react-data-table/forks","keys_url":"https://api.github.com/repos/anhtrantuan/react-data-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anhtrantuan/react-data-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anhtrantuan/react-data-table/teams","hooks_url":"https://api.github.com/repos/anhtrantuan/react-data-table/hooks","issue_events_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/events{/number}","events_url":"https://api.github.com/repos/anhtrantuan/react-data-table/events","assignees_url":"https://api.github.com/repos/anhtrantuan/react-data-table/assignees{/user}","branches_url":"https://api.github.com/repos/anhtrantuan/react-data-table/branches{/branch}","tags_url":"https://api.github.com/repos/anhtrantuan/react-data-table/tags","blobs_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anhtrantuan/react-data-table/statuses/{sha}","languages_url":"https://api.github.com/repos/anhtrantuan/react-data-table/languages","stargazers_url":"https://api.github.com/repos/anhtrantuan/react-data-table/stargazers","contributors_url":"https://api.github.com/repos/anhtrantuan/react-data-table/contributors","subscribers_url":"https://api.github.com/repos/anhtrantuan/react-data-table/subscribers","subscription_url":"https://api.github.com/repos/anhtrantuan/react-data-table/subscription","commits_url":"https://api.github.com/repos/anhtrantuan/react-data-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/comments{/number}","contents_url":"https://api.github.com/repos/anhtrantuan/react-data-table/contents/{+path}","compare_url":"https://api.github.com/repos/anhtrantuan/react-data-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anhtrantuan/react-data-table/merges","archive_url":"https://api.github.com/repos/anhtrantuan/react-data-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anhtrantuan/react-data-table/downloads","issues_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues{/number}","pulls_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls{/number}","milestones_url":"https://api.github.com/repos/anhtrantuan/react-data-table/milestones{/number}","notifications_url":"https://api.github.com/repos/anhtrantuan/react-data-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anhtrantuan/react-data-table/labels{/name}","releases_url":"https://api.github.com/repos/anhtrantuan/react-data-table/releases{/id}","deployments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/deployments","created_at":"2018-03-07T03:19:08Z","updated_at":"2018-03-23T18:04:22Z","pushed_at":"2018-04-09T17:56:54Z","git_url":"git://github.com/anhtrantuan/react-data-table.git","ssh_url":"git@github.com:anhtrantuan/react-data-table.git","clone_url":"https://github.com/anhtrantuan/react-data-table.git","svn_url":"https://github.com/anhtrantuan/react-data-table","homepage":null,"size":313,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"anhtrantuan:phongdo/v0.0.1","ref":"phongdo/v0.0.1","sha":"9b6c87564c1285d3ebb856e93f2fdc59a222a568","user":{"login":"anhtrantuan","id":2020180,"avatar_url":"https://avatars1.githubusercontent.com/u/2020180?v=4","gravatar_id":"","url":"https://api.github.com/users/anhtrantuan","html_url":"https://github.com/anhtrantuan","followers_url":"https://api.github.com/users/anhtrantuan/followers","following_url":"https://api.github.com/users/anhtrantuan/following{/other_user}","gists_url":"https://api.github.com/users/anhtrantuan/gists{/gist_id}","starred_url":"https://api.github.com/users/anhtrantuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhtrantuan/subscriptions","organizations_url":"https://api.github.com/users/anhtrantuan/orgs","repos_url":"https://api.github.com/users/anhtrantuan/repos","events_url":"https://api.github.com/users/anhtrantuan/events{/privacy}","received_events_url":"https://api.github.com/users/anhtrantuan/received_events","type":"User","site_admin":false},"repo":{"id":124172494,"name":"react-data-table","full_name":"anhtrantuan/react-data-table","owner":{"login":"anhtrantuan","id":2020180,"avatar_url":"https://avatars1.githubusercontent.com/u/2020180?v=4","gravatar_id":"","url":"https://api.github.com/users/anhtrantuan","html_url":"https://github.com/anhtrantuan","followers_url":"https://api.github.com/users/anhtrantuan/followers","following_url":"https://api.github.com/users/anhtrantuan/following{/other_user}","gists_url":"https://api.github.com/users/anhtrantuan/gists{/gist_id}","starred_url":"https://api.github.com/users/anhtrantuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhtrantuan/subscriptions","organizations_url":"https://api.github.com/users/anhtrantuan/orgs","repos_url":"https://api.github.com/users/anhtrantuan/repos","events_url":"https://api.github.com/users/anhtrantuan/events{/privacy}","received_events_url":"https://api.github.com/users/anhtrantuan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anhtrantuan/react-data-table","description":"Data table for React.JS","fork":false,"url":"https://api.github.com/repos/anhtrantuan/react-data-table","forks_url":"https://api.github.com/repos/anhtrantuan/react-data-table/forks","keys_url":"https://api.github.com/repos/anhtrantuan/react-data-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anhtrantuan/react-data-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anhtrantuan/react-data-table/teams","hooks_url":"https://api.github.com/repos/anhtrantuan/react-data-table/hooks","issue_events_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/events{/number}","events_url":"https://api.github.com/repos/anhtrantuan/react-data-table/events","assignees_url":"https://api.github.com/repos/anhtrantuan/react-data-table/assignees{/user}","branches_url":"https://api.github.com/repos/anhtrantuan/react-data-table/branches{/branch}","tags_url":"https://api.github.com/repos/anhtrantuan/react-data-table/tags","blobs_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anhtrantuan/react-data-table/statuses/{sha}","languages_url":"https://api.github.com/repos/anhtrantuan/react-data-table/languages","stargazers_url":"https://api.github.com/repos/anhtrantuan/react-data-table/stargazers","contributors_url":"https://api.github.com/repos/anhtrantuan/react-data-table/contributors","subscribers_url":"https://api.github.com/repos/anhtrantuan/react-data-table/subscribers","subscription_url":"https://api.github.com/repos/anhtrantuan/react-data-table/subscription","commits_url":"https://api.github.com/repos/anhtrantuan/react-data-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/anhtrantuan/react-data-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/comments{/number}","contents_url":"https://api.github.com/repos/anhtrantuan/react-data-table/contents/{+path}","compare_url":"https://api.github.com/repos/anhtrantuan/react-data-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anhtrantuan/react-data-table/merges","archive_url":"https://api.github.com/repos/anhtrantuan/react-data-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anhtrantuan/react-data-table/downloads","issues_url":"https://api.github.com/repos/anhtrantuan/react-data-table/issues{/number}","pulls_url":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls{/number}","milestones_url":"https://api.github.com/repos/anhtrantuan/react-data-table/milestones{/number}","notifications_url":"https://api.github.com/repos/anhtrantuan/react-data-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anhtrantuan/react-data-table/labels{/name}","releases_url":"https://api.github.com/repos/anhtrantuan/react-data-table/releases{/id}","deployments_url":"https://api.github.com/repos/anhtrantuan/react-data-table/deployments","created_at":"2018-03-07T03:19:08Z","updated_at":"2018-03-23T18:04:22Z","pushed_at":"2018-04-09T17:56:54Z","git_url":"git://github.com/anhtrantuan/react-data-table.git","ssh_url":"git@github.com:anhtrantuan/react-data-table.git","clone_url":"https://github.com/anhtrantuan/react-data-table.git","svn_url":"https://github.com/anhtrantuan/react-data-table","homepage":null,"size":313,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2"},"html":{"href":"https://github.com/anhtrantuan/react-data-table/pull/2"},"issue":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/2"},"comments":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/anhtrantuan/react-data-table/statuses/576c5849f4c1bf2e5f3f906bfccc4f53a922379b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"trungdq88"}}