{"action":"created","comment":{"url":"https://api.github.com/repos/bill-split/bill-split/pulls/comments/233710998","pull_request_review_id":175189309,"id":233710998,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzcxMDk5OA==","diff_hunk":"@@ -70,19 +70,24 @@ export class ItemFieldSet extends React.Component<IItemFieldSetProps, IItemField\n     </IconButton>);\n     const itemsArray = this.state.items.map((item: IItemInternal, itemIndex: number) => {\n       let minusBtn = null;\n+      let autoFocus = false;\n       if (itemIndex > 0) {\n         minusBtn = (\n           <IconButton aria-label=\"Remove item\" onClick={this.remove(itemIndex)}>\n             <RemoveCircleIcon style={{ height: '24px', width: '24px' }} />\n           </IconButton>)\n       }\n+      if (itemIndex === 0) {\n+        autoFocus = true;\n+      }\n       return (<div key={itemIndex}>\n         <Card key={itemIndex}>\n           <CardContent>\n             <p>Describe Item Consumed</p>\n             {minusBtn}\n             <div>\n               <TextField type=\"text\"\n+                autoFocus={autoFocus}","path":"src/ItemFieldSet.tsx","position":21,"original_position":21,"commit_id":"3a27d236c01ab5de41487087a085b3ac599b76f1","original_commit_id":"3a27d236c01ab5de41487087a085b3ac599b76f1","user":{"login":"flamecoals","id":1034631,"node_id":"MDQ6VXNlcjEwMzQ2MzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1034631?v=4","gravatar_id":"","url":"https://api.github.com/users/flamecoals","html_url":"https://github.com/flamecoals","followers_url":"https://api.github.com/users/flamecoals/followers","following_url":"https://api.github.com/users/flamecoals/following{/other_user}","gists_url":"https://api.github.com/users/flamecoals/gists{/gist_id}","starred_url":"https://api.github.com/users/flamecoals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flamecoals/subscriptions","organizations_url":"https://api.github.com/users/flamecoals/orgs","repos_url":"https://api.github.com/users/flamecoals/repos","events_url":"https://api.github.com/users/flamecoals/events{/privacy}","received_events_url":"https://api.github.com/users/flamecoals/received_events","type":"User","site_admin":false},"body":"no need to create a variable, replace this line with:\r\nautoFocus={itemIndex === 0}","created_at":"2018-11-15T04:45:54Z","updated_at":"2018-11-15T04:46:13Z","html_url":"https://github.com/bill-split/bill-split/pull/25#discussion_r233710998","pull_request_url":"https://api.github.com/repos/bill-split/bill-split/pulls/25","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/comments/233710998"},"html":{"href":"https://github.com/bill-split/bill-split/pull/25#discussion_r233710998"},"pull_request":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/bill-split/bill-split/pulls/25","id":230974651,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwOTc0NjUx","html_url":"https://github.com/bill-split/bill-split/pull/25","diff_url":"https://github.com/bill-split/bill-split/pull/25.diff","patch_url":"https://github.com/bill-split/bill-split/pull/25.patch","issue_url":"https://api.github.com/repos/bill-split/bill-split/issues/25","number":25,"state":"open","locked":false,"title":"Autofocus on fields","user":{"login":"jasonharrison","id":304383,"node_id":"MDQ6VXNlcjMwNDM4Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/304383?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonharrison","html_url":"https://github.com/jasonharrison","followers_url":"https://api.github.com/users/jasonharrison/followers","following_url":"https://api.github.com/users/jasonharrison/following{/other_user}","gists_url":"https://api.github.com/users/jasonharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonharrison/subscriptions","organizations_url":"https://api.github.com/users/jasonharrison/orgs","repos_url":"https://api.github.com/users/jasonharrison/repos","events_url":"https://api.github.com/users/jasonharrison/events{/privacy}","received_events_url":"https://api.github.com/users/jasonharrison/received_events","type":"User","site_admin":false},"body":"Autofocus on the first field for NameFieldSet and ItemFieldSet.\r\n\r\nhttps://autofocus-on-fields.ci.bill-split.com/","created_at":"2018-11-14T20:41:54Z","updated_at":"2018-11-15T04:46:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a8a8c897ee30a0dc463ded078b4a5464777bb50","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1107173676,"node_id":"MDU6TGFiZWwxMTA3MTczNjc2","url":"https://api.github.com/repos/bill-split/bill-split/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/bill-split/bill-split/pulls/25/commits","review_comments_url":"https://api.github.com/repos/bill-split/bill-split/pulls/25/comments","review_comment_url":"https://api.github.com/repos/bill-split/bill-split/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bill-split/bill-split/issues/25/comments","statuses_url":"https://api.github.com/repos/bill-split/bill-split/statuses/3a27d236c01ab5de41487087a085b3ac599b76f1","head":{"label":"bill-split:autofocus-on-fields","ref":"autofocus-on-fields","sha":"3a27d236c01ab5de41487087a085b3ac599b76f1","user":{"login":"bill-split","id":44513993,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NTEzOTkz","avatar_url":"https://avatars2.githubusercontent.com/u/44513993?v=4","gravatar_id":"","url":"https://api.github.com/users/bill-split","html_url":"https://github.com/bill-split","followers_url":"https://api.github.com/users/bill-split/followers","following_url":"https://api.github.com/users/bill-split/following{/other_user}","gists_url":"https://api.github.com/users/bill-split/gists{/gist_id}","starred_url":"https://api.github.com/users/bill-split/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bill-split/subscriptions","organizations_url":"https://api.github.com/users/bill-split/orgs","repos_url":"https://api.github.com/users/bill-split/repos","events_url":"https://api.github.com/users/bill-split/events{/privacy}","received_events_url":"https://api.github.com/users/bill-split/received_events","type":"Organization","site_admin":false},"repo":{"id":155037071,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUwMzcwNzE=","name":"bill-split","full_name":"bill-split/bill-split","private":false,"owner":{"login":"bill-split","id":44513993,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NTEzOTkz","avatar_url":"https://avatars2.githubusercontent.com/u/44513993?v=4","gravatar_id":"","url":"https://api.github.com/users/bill-split","html_url":"https://github.com/bill-split","followers_url":"https://api.github.com/users/bill-split/followers","following_url":"https://api.github.com/users/bill-split/following{/other_user}","gists_url":"https://api.github.com/users/bill-split/gists{/gist_id}","starred_url":"https://api.github.com/users/bill-split/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bill-split/subscriptions","organizations_url":"https://api.github.com/users/bill-split/orgs","repos_url":"https://api.github.com/users/bill-split/repos","events_url":"https://api.github.com/users/bill-split/events{/privacy}","received_events_url":"https://api.github.com/users/bill-split/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bill-split/bill-split","description":null,"fork":false,"url":"https://api.github.com/repos/bill-split/bill-split","forks_url":"https://api.github.com/repos/bill-split/bill-split/forks","keys_url":"https://api.github.com/repos/bill-split/bill-split/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bill-split/bill-split/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bill-split/bill-split/teams","hooks_url":"https://api.github.com/repos/bill-split/bill-split/hooks","issue_events_url":"https://api.github.com/repos/bill-split/bill-split/issues/events{/number}","events_url":"https://api.github.com/repos/bill-split/bill-split/events","assignees_url":"https://api.github.com/repos/bill-split/bill-split/assignees{/user}","branches_url":"https://api.github.com/repos/bill-split/bill-split/branches{/branch}","tags_url":"https://api.github.com/repos/bill-split/bill-split/tags","blobs_url":"https://api.github.com/repos/bill-split/bill-split/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bill-split/bill-split/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bill-split/bill-split/git/refs{/sha}","trees_url":"https://api.github.com/repos/bill-split/bill-split/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bill-split/bill-split/statuses/{sha}","languages_url":"https://api.github.com/repos/bill-split/bill-split/languages","stargazers_url":"https://api.github.com/repos/bill-split/bill-split/stargazers","contributors_url":"https://api.github.com/repos/bill-split/bill-split/contributors","subscribers_url":"https://api.github.com/repos/bill-split/bill-split/subscribers","subscription_url":"https://api.github.com/repos/bill-split/bill-split/subscription","commits_url":"https://api.github.com/repos/bill-split/bill-split/commits{/sha}","git_commits_url":"https://api.github.com/repos/bill-split/bill-split/git/commits{/sha}","comments_url":"https://api.github.com/repos/bill-split/bill-split/comments{/number}","issue_comment_url":"https://api.github.com/repos/bill-split/bill-split/issues/comments{/number}","contents_url":"https://api.github.com/repos/bill-split/bill-split/contents/{+path}","compare_url":"https://api.github.com/repos/bill-split/bill-split/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bill-split/bill-split/merges","archive_url":"https://api.github.com/repos/bill-split/bill-split/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bill-split/bill-split/downloads","issues_url":"https://api.github.com/repos/bill-split/bill-split/issues{/number}","pulls_url":"https://api.github.com/repos/bill-split/bill-split/pulls{/number}","milestones_url":"https://api.github.com/repos/bill-split/bill-split/milestones{/number}","notifications_url":"https://api.github.com/repos/bill-split/bill-split/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bill-split/bill-split/labels{/name}","releases_url":"https://api.github.com/repos/bill-split/bill-split/releases{/id}","deployments_url":"https://api.github.com/repos/bill-split/bill-split/deployments","created_at":"2018-10-28T05:03:03Z","updated_at":"2018-11-14T20:06:11Z","pushed_at":"2018-11-14T20:42:48Z","git_url":"git://github.com/bill-split/bill-split.git","ssh_url":"git@github.com:bill-split/bill-split.git","clone_url":"https://github.com/bill-split/bill-split.git","svn_url":"https://github.com/bill-split/bill-split","homepage":null,"size":656,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"bill-split:master","ref":"master","sha":"c505fd5787103626d60c172e9a198d9cc2a625bb","user":{"login":"bill-split","id":44513993,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NTEzOTkz","avatar_url":"https://avatars2.githubusercontent.com/u/44513993?v=4","gravatar_id":"","url":"https://api.github.com/users/bill-split","html_url":"https://github.com/bill-split","followers_url":"https://api.github.com/users/bill-split/followers","following_url":"https://api.github.com/users/bill-split/following{/other_user}","gists_url":"https://api.github.com/users/bill-split/gists{/gist_id}","starred_url":"https://api.github.com/users/bill-split/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bill-split/subscriptions","organizations_url":"https://api.github.com/users/bill-split/orgs","repos_url":"https://api.github.com/users/bill-split/repos","events_url":"https://api.github.com/users/bill-split/events{/privacy}","received_events_url":"https://api.github.com/users/bill-split/received_events","type":"Organization","site_admin":false},"repo":{"id":155037071,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUwMzcwNzE=","name":"bill-split","full_name":"bill-split/bill-split","private":false,"owner":{"login":"bill-split","id":44513993,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0NTEzOTkz","avatar_url":"https://avatars2.githubusercontent.com/u/44513993?v=4","gravatar_id":"","url":"https://api.github.com/users/bill-split","html_url":"https://github.com/bill-split","followers_url":"https://api.github.com/users/bill-split/followers","following_url":"https://api.github.com/users/bill-split/following{/other_user}","gists_url":"https://api.github.com/users/bill-split/gists{/gist_id}","starred_url":"https://api.github.com/users/bill-split/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bill-split/subscriptions","organizations_url":"https://api.github.com/users/bill-split/orgs","repos_url":"https://api.github.com/users/bill-split/repos","events_url":"https://api.github.com/users/bill-split/events{/privacy}","received_events_url":"https://api.github.com/users/bill-split/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bill-split/bill-split","description":null,"fork":false,"url":"https://api.github.com/repos/bill-split/bill-split","forks_url":"https://api.github.com/repos/bill-split/bill-split/forks","keys_url":"https://api.github.com/repos/bill-split/bill-split/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bill-split/bill-split/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bill-split/bill-split/teams","hooks_url":"https://api.github.com/repos/bill-split/bill-split/hooks","issue_events_url":"https://api.github.com/repos/bill-split/bill-split/issues/events{/number}","events_url":"https://api.github.com/repos/bill-split/bill-split/events","assignees_url":"https://api.github.com/repos/bill-split/bill-split/assignees{/user}","branches_url":"https://api.github.com/repos/bill-split/bill-split/branches{/branch}","tags_url":"https://api.github.com/repos/bill-split/bill-split/tags","blobs_url":"https://api.github.com/repos/bill-split/bill-split/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bill-split/bill-split/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bill-split/bill-split/git/refs{/sha}","trees_url":"https://api.github.com/repos/bill-split/bill-split/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bill-split/bill-split/statuses/{sha}","languages_url":"https://api.github.com/repos/bill-split/bill-split/languages","stargazers_url":"https://api.github.com/repos/bill-split/bill-split/stargazers","contributors_url":"https://api.github.com/repos/bill-split/bill-split/contributors","subscribers_url":"https://api.github.com/repos/bill-split/bill-split/subscribers","subscription_url":"https://api.github.com/repos/bill-split/bill-split/subscription","commits_url":"https://api.github.com/repos/bill-split/bill-split/commits{/sha}","git_commits_url":"https://api.github.com/repos/bill-split/bill-split/git/commits{/sha}","comments_url":"https://api.github.com/repos/bill-split/bill-split/comments{/number}","issue_comment_url":"https://api.github.com/repos/bill-split/bill-split/issues/comments{/number}","contents_url":"https://api.github.com/repos/bill-split/bill-split/contents/{+path}","compare_url":"https://api.github.com/repos/bill-split/bill-split/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bill-split/bill-split/merges","archive_url":"https://api.github.com/repos/bill-split/bill-split/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bill-split/bill-split/downloads","issues_url":"https://api.github.com/repos/bill-split/bill-split/issues{/number}","pulls_url":"https://api.github.com/repos/bill-split/bill-split/pulls{/number}","milestones_url":"https://api.github.com/repos/bill-split/bill-split/milestones{/number}","notifications_url":"https://api.github.com/repos/bill-split/bill-split/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bill-split/bill-split/labels{/name}","releases_url":"https://api.github.com/repos/bill-split/bill-split/releases{/id}","deployments_url":"https://api.github.com/repos/bill-split/bill-split/deployments","created_at":"2018-10-28T05:03:03Z","updated_at":"2018-11-14T20:06:11Z","pushed_at":"2018-11-14T20:42:48Z","git_url":"git://github.com/bill-split/bill-split.git","ssh_url":"git@github.com:bill-split/bill-split.git","clone_url":"https://github.com/bill-split/bill-split.git","svn_url":"https://github.com/bill-split/bill-split","homepage":null,"size":656,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/25"},"html":{"href":"https://github.com/bill-split/bill-split/pull/25"},"issue":{"href":"https://api.github.com/repos/bill-split/bill-split/issues/25"},"comments":{"href":"https://api.github.com/repos/bill-split/bill-split/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bill-split/bill-split/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/bill-split/bill-split/statuses/3a27d236c01ab5de41487087a085b3ac599b76f1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"flamecoals"}}