{"action":"created","comment":{"url":"https://api.github.com/repos/coveo/react-vapor/pulls/comments/173184872","pull_request_review_id":102330955,"id":173184872,"diff_hunk":"@@ -57,16 +59,46 @@ export const getTableCompositeState = (state: IReactVaporState, id: string): ITa\n   } as ITableCompositeState;\n };\n \n+const getDataById = (data: ITableData, props: ITableOwnProps): ITableById => data.byId;\n+\n+const getSelectedIds = (data: ITableData, props: ITableOwnProps): string[] => data.selectedIds || [];\n+\n+const getActions = (data: ITableData, props: ITableOwnProps): (rowData?: IData) => IActionOptions[] => props.getActions;\n+\n+const getMultiSelect = (data: ITableData, props: ITableOwnProps): boolean => props.rowsMultiSelect;\n+\n+const actionsSelector = createSelector(\n+  [getDataById, getSelectedIds, getMultiSelect, getActions],\n+  (byId: ITableById, selectedIds: string[], isMultiSelect: boolean, getAction: (rowData?: IData) => IActionOptions[]): IActionOptions[] => {\n+    const rowsData: IData[] = [];\n+    _.each(selectedIds, (id: string, index: number) => {\n+      const rowData: IData = byId[id];\n+      if (rowData) {\n+        rowsData.push(rowData);\n+      }\n+    });\n+    if (getAction) {\n+      if (rowsData.length) {","path":"src/components/tables/TableConnected.tsx","position":61,"original_position":61,"commit_id":"6dfc49b786fde42aa7da95f380c713a1712115fe","original_commit_id":"6dfc49b786fde42aa7da95f380c713a1712115fe","user":{"login":"MichelML","id":9539763,"avatar_url":"https://avatars3.githubusercontent.com/u/9539763?v=4","gravatar_id":"","url":"https://api.github.com/users/MichelML","html_url":"https://github.com/MichelML","followers_url":"https://api.github.com/users/MichelML/followers","following_url":"https://api.github.com/users/MichelML/following{/other_user}","gists_url":"https://api.github.com/users/MichelML/gists{/gist_id}","starred_url":"https://api.github.com/users/MichelML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichelML/subscriptions","organizations_url":"https://api.github.com/users/MichelML/orgs","repos_url":"https://api.github.com/users/MichelML/repos","events_url":"https://api.github.com/users/MichelML/events{/privacy}","received_events_url":"https://api.github.com/users/MichelML/received_events","type":"User","site_admin":false},"body":"if (getActions && rowsData.length)\r\nno need for nested ifs","created_at":"2018-03-08T15:05:50Z","updated_at":"2018-03-08T15:05:50Z","html_url":"https://github.com/coveo/react-vapor/pull/511#discussion_r173184872","pull_request_url":"https://api.github.com/repos/coveo/react-vapor/pulls/511","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/comments/173184872"},"html":{"href":"https://github.com/coveo/react-vapor/pull/511#discussion_r173184872"},"pull_request":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/511"}}},"pull_request":{"url":"https://api.github.com/repos/coveo/react-vapor/pulls/511","id":173494173,"html_url":"https://github.com/coveo/react-vapor/pull/511","diff_url":"https://github.com/coveo/react-vapor/pull/511.diff","patch_url":"https://github.com/coveo/react-vapor/pull/511.patch","issue_url":"https://api.github.com/repos/coveo/react-vapor/issues/511","number":511,"state":"open","locked":false,"title":"Add the multi select table and fix actions update on table rendering","user":{"login":"pochretien","id":7167202,"avatar_url":"https://avatars0.githubusercontent.com/u/7167202?v=4","gravatar_id":"","url":"https://api.github.com/users/pochretien","html_url":"https://github.com/pochretien","followers_url":"https://api.github.com/users/pochretien/followers","following_url":"https://api.github.com/users/pochretien/following{/other_user}","gists_url":"https://api.github.com/users/pochretien/gists{/gist_id}","starred_url":"https://api.github.com/users/pochretien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pochretien/subscriptions","organizations_url":"https://api.github.com/users/pochretien/orgs","repos_url":"https://api.github.com/users/pochretien/repos","events_url":"https://api.github.com/users/pochretien/events{/privacy}","received_events_url":"https://api.github.com/users/pochretien/received_events","type":"User","site_admin":false},"body":"Give an overview before uts.","created_at":"2018-03-07T15:56:00Z","updated_at":"2018-03-08T15:05:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bc8de69b2fea5ae7c4a9dc8fcb9f5f781cd47ef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/coveo/react-vapor/pulls/511/commits","review_comments_url":"https://api.github.com/repos/coveo/react-vapor/pulls/511/comments","review_comment_url":"https://api.github.com/repos/coveo/react-vapor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coveo/react-vapor/issues/511/comments","statuses_url":"https://api.github.com/repos/coveo/react-vapor/statuses/6dfc49b786fde42aa7da95f380c713a1712115fe","head":{"label":"coveo:update-table-row-actions-on-component-update","ref":"update-table-row-actions-on-component-update","sha":"6dfc49b786fde42aa7da95f380c713a1712115fe","user":{"login":"coveo","id":8632328,"avatar_url":"https://avatars2.githubusercontent.com/u/8632328?v=4","gravatar_id":"","url":"https://api.github.com/users/coveo","html_url":"https://github.com/coveo","followers_url":"https://api.github.com/users/coveo/followers","following_url":"https://api.github.com/users/coveo/following{/other_user}","gists_url":"https://api.github.com/users/coveo/gists{/gist_id}","starred_url":"https://api.github.com/users/coveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveo/subscriptions","organizations_url":"https://api.github.com/users/coveo/orgs","repos_url":"https://api.github.com/users/coveo/repos","events_url":"https://api.github.com/users/coveo/events{/privacy}","received_events_url":"https://api.github.com/users/coveo/received_events","type":"Organization","site_admin":false},"repo":{"id":68227694,"name":"react-vapor","full_name":"coveo/react-vapor","owner":{"login":"coveo","id":8632328,"avatar_url":"https://avatars2.githubusercontent.com/u/8632328?v=4","gravatar_id":"","url":"https://api.github.com/users/coveo","html_url":"https://github.com/coveo","followers_url":"https://api.github.com/users/coveo/followers","following_url":"https://api.github.com/users/coveo/following{/other_user}","gists_url":"https://api.github.com/users/coveo/gists{/gist_id}","starred_url":"https://api.github.com/users/coveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveo/subscriptions","organizations_url":"https://api.github.com/users/coveo/orgs","repos_url":"https://api.github.com/users/coveo/repos","events_url":"https://api.github.com/users/coveo/events{/privacy}","received_events_url":"https://api.github.com/users/coveo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coveo/react-vapor","description":"Vapor CSS components implemented with React!","fork":false,"url":"https://api.github.com/repos/coveo/react-vapor","forks_url":"https://api.github.com/repos/coveo/react-vapor/forks","keys_url":"https://api.github.com/repos/coveo/react-vapor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coveo/react-vapor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coveo/react-vapor/teams","hooks_url":"https://api.github.com/repos/coveo/react-vapor/hooks","issue_events_url":"https://api.github.com/repos/coveo/react-vapor/issues/events{/number}","events_url":"https://api.github.com/repos/coveo/react-vapor/events","assignees_url":"https://api.github.com/repos/coveo/react-vapor/assignees{/user}","branches_url":"https://api.github.com/repos/coveo/react-vapor/branches{/branch}","tags_url":"https://api.github.com/repos/coveo/react-vapor/tags","blobs_url":"https://api.github.com/repos/coveo/react-vapor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coveo/react-vapor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coveo/react-vapor/git/refs{/sha}","trees_url":"https://api.github.com/repos/coveo/react-vapor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coveo/react-vapor/statuses/{sha}","languages_url":"https://api.github.com/repos/coveo/react-vapor/languages","stargazers_url":"https://api.github.com/repos/coveo/react-vapor/stargazers","contributors_url":"https://api.github.com/repos/coveo/react-vapor/contributors","subscribers_url":"https://api.github.com/repos/coveo/react-vapor/subscribers","subscription_url":"https://api.github.com/repos/coveo/react-vapor/subscription","commits_url":"https://api.github.com/repos/coveo/react-vapor/commits{/sha}","git_commits_url":"https://api.github.com/repos/coveo/react-vapor/git/commits{/sha}","comments_url":"https://api.github.com/repos/coveo/react-vapor/comments{/number}","issue_comment_url":"https://api.github.com/repos/coveo/react-vapor/issues/comments{/number}","contents_url":"https://api.github.com/repos/coveo/react-vapor/contents/{+path}","compare_url":"https://api.github.com/repos/coveo/react-vapor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coveo/react-vapor/merges","archive_url":"https://api.github.com/repos/coveo/react-vapor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coveo/react-vapor/downloads","issues_url":"https://api.github.com/repos/coveo/react-vapor/issues{/number}","pulls_url":"https://api.github.com/repos/coveo/react-vapor/pulls{/number}","milestones_url":"https://api.github.com/repos/coveo/react-vapor/milestones{/number}","notifications_url":"https://api.github.com/repos/coveo/react-vapor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coveo/react-vapor/labels{/name}","releases_url":"https://api.github.com/repos/coveo/react-vapor/releases{/id}","deployments_url":"https://api.github.com/repos/coveo/react-vapor/deployments","created_at":"2016-09-14T17:25:21Z","updated_at":"2018-02-17T03:14:47Z","pushed_at":"2018-03-08T14:01:17Z","git_url":"git://github.com/coveo/react-vapor.git","ssh_url":"git@github.com:coveo/react-vapor.git","clone_url":"https://github.com/coveo/react-vapor.git","svn_url":"https://github.com/coveo/react-vapor","homepage":"","size":8183,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":26,"watchers":6,"default_branch":"master"}},"base":{"label":"coveo:master","ref":"master","sha":"75a5d5b7f04cba9d2718af6e5fc41c6ab9e99694","user":{"login":"coveo","id":8632328,"avatar_url":"https://avatars2.githubusercontent.com/u/8632328?v=4","gravatar_id":"","url":"https://api.github.com/users/coveo","html_url":"https://github.com/coveo","followers_url":"https://api.github.com/users/coveo/followers","following_url":"https://api.github.com/users/coveo/following{/other_user}","gists_url":"https://api.github.com/users/coveo/gists{/gist_id}","starred_url":"https://api.github.com/users/coveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveo/subscriptions","organizations_url":"https://api.github.com/users/coveo/orgs","repos_url":"https://api.github.com/users/coveo/repos","events_url":"https://api.github.com/users/coveo/events{/privacy}","received_events_url":"https://api.github.com/users/coveo/received_events","type":"Organization","site_admin":false},"repo":{"id":68227694,"name":"react-vapor","full_name":"coveo/react-vapor","owner":{"login":"coveo","id":8632328,"avatar_url":"https://avatars2.githubusercontent.com/u/8632328?v=4","gravatar_id":"","url":"https://api.github.com/users/coveo","html_url":"https://github.com/coveo","followers_url":"https://api.github.com/users/coveo/followers","following_url":"https://api.github.com/users/coveo/following{/other_user}","gists_url":"https://api.github.com/users/coveo/gists{/gist_id}","starred_url":"https://api.github.com/users/coveo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveo/subscriptions","organizations_url":"https://api.github.com/users/coveo/orgs","repos_url":"https://api.github.com/users/coveo/repos","events_url":"https://api.github.com/users/coveo/events{/privacy}","received_events_url":"https://api.github.com/users/coveo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coveo/react-vapor","description":"Vapor CSS components implemented with React!","fork":false,"url":"https://api.github.com/repos/coveo/react-vapor","forks_url":"https://api.github.com/repos/coveo/react-vapor/forks","keys_url":"https://api.github.com/repos/coveo/react-vapor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coveo/react-vapor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coveo/react-vapor/teams","hooks_url":"https://api.github.com/repos/coveo/react-vapor/hooks","issue_events_url":"https://api.github.com/repos/coveo/react-vapor/issues/events{/number}","events_url":"https://api.github.com/repos/coveo/react-vapor/events","assignees_url":"https://api.github.com/repos/coveo/react-vapor/assignees{/user}","branches_url":"https://api.github.com/repos/coveo/react-vapor/branches{/branch}","tags_url":"https://api.github.com/repos/coveo/react-vapor/tags","blobs_url":"https://api.github.com/repos/coveo/react-vapor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coveo/react-vapor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coveo/react-vapor/git/refs{/sha}","trees_url":"https://api.github.com/repos/coveo/react-vapor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coveo/react-vapor/statuses/{sha}","languages_url":"https://api.github.com/repos/coveo/react-vapor/languages","stargazers_url":"https://api.github.com/repos/coveo/react-vapor/stargazers","contributors_url":"https://api.github.com/repos/coveo/react-vapor/contributors","subscribers_url":"https://api.github.com/repos/coveo/react-vapor/subscribers","subscription_url":"https://api.github.com/repos/coveo/react-vapor/subscription","commits_url":"https://api.github.com/repos/coveo/react-vapor/commits{/sha}","git_commits_url":"https://api.github.com/repos/coveo/react-vapor/git/commits{/sha}","comments_url":"https://api.github.com/repos/coveo/react-vapor/comments{/number}","issue_comment_url":"https://api.github.com/repos/coveo/react-vapor/issues/comments{/number}","contents_url":"https://api.github.com/repos/coveo/react-vapor/contents/{+path}","compare_url":"https://api.github.com/repos/coveo/react-vapor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coveo/react-vapor/merges","archive_url":"https://api.github.com/repos/coveo/react-vapor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coveo/react-vapor/downloads","issues_url":"https://api.github.com/repos/coveo/react-vapor/issues{/number}","pulls_url":"https://api.github.com/repos/coveo/react-vapor/pulls{/number}","milestones_url":"https://api.github.com/repos/coveo/react-vapor/milestones{/number}","notifications_url":"https://api.github.com/repos/coveo/react-vapor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coveo/react-vapor/labels{/name}","releases_url":"https://api.github.com/repos/coveo/react-vapor/releases{/id}","deployments_url":"https://api.github.com/repos/coveo/react-vapor/deployments","created_at":"2016-09-14T17:25:21Z","updated_at":"2018-02-17T03:14:47Z","pushed_at":"2018-03-08T14:01:17Z","git_url":"git://github.com/coveo/react-vapor.git","ssh_url":"git@github.com:coveo/react-vapor.git","clone_url":"https://github.com/coveo/react-vapor.git","svn_url":"https://github.com/coveo/react-vapor","homepage":"","size":8183,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":26,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/511"},"html":{"href":"https://github.com/coveo/react-vapor/pull/511"},"issue":{"href":"https://api.github.com/repos/coveo/react-vapor/issues/511"},"comments":{"href":"https://api.github.com/repos/coveo/react-vapor/issues/511/comments"},"review_comments":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/511/comments"},"review_comment":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coveo/react-vapor/pulls/511/commits"},"statuses":{"href":"https://api.github.com/repos/coveo/react-vapor/statuses/6dfc49b786fde42aa7da95f380c713a1712115fe"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MichelML"}}