{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/190076968","pull_request_review_id":122380959,"id":190076968,"diff_hunk":"@@ -85,12 +100,23 @@ export default class AutosuggestField extends React.Component {\n       return suggestion.id;\n     }\n \n-    return _.set('widget', 'autosuggest', suggestion);\n+    const newSuggestion = _.set('widget', 'autosuggest', suggestion);\n+    // When freeInput is true, we'll return the label to the api instead of the id\n+    if (this.props.uiSchema['ui:options'].freeInput) {\n+      newSuggestion.freeInput = true;\n+    }\n+\n+    return newSuggestion;\n   }\n \n   handleInputValueChange = (inputValue) => {\n     if (inputValue !== this.state.input) {\n-      let item = { widget: 'autosuggest', label: inputValue };\n+      const uiOptions = this.props.uiSchema['ui:options'];\n+      if (uiOptions.queryForResults) {","path":"src/applications/common/schemaform/fields/AutosuggestField.jsx","position":76,"original_position":76,"commit_id":"10924f572cedea49726f3b805929ac90d9a15396","original_commit_id":"10924f572cedea49726f3b805929ac90d9a15396","user":{"login":"cehsu","id":16051172,"avatar_url":"https://avatars1.githubusercontent.com/u/16051172?v=4","gravatar_id":"","url":"https://api.github.com/users/cehsu","html_url":"https://github.com/cehsu","followers_url":"https://api.github.com/users/cehsu/followers","following_url":"https://api.github.com/users/cehsu/following{/other_user}","gists_url":"https://api.github.com/users/cehsu/gists{/gist_id}","starred_url":"https://api.github.com/users/cehsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cehsu/subscriptions","organizations_url":"https://api.github.com/users/cehsu/orgs","repos_url":"https://api.github.com/users/cehsu/repos","events_url":"https://api.github.com/users/cehsu/events{/privacy}","received_events_url":"https://api.github.com/users/cehsu/received_events","type":"User","site_admin":false},"body":"Thanks for explaining.","created_at":"2018-05-22T22:48:38Z","updated_at":"2018-05-22T22:48:38Z","html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719#discussion_r190076968","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/190076968"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719#discussion_r190076968"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719"}},"in_reply_to_id":189715812},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719","id":187321994,"html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719","diff_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719.diff","patch_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7719","number":7719,"state":"open","locked":false,"title":"Autosuggest features","user":{"login":"cvalarida","id":12970166,"avatar_url":"https://avatars0.githubusercontent.com/u/12970166?v=4","gravatar_id":"","url":"https://api.github.com/users/cvalarida","html_url":"https://github.com/cvalarida","followers_url":"https://api.github.com/users/cvalarida/followers","following_url":"https://api.github.com/users/cvalarida/following{/other_user}","gists_url":"https://api.github.com/users/cvalarida/gists{/gist_id}","starred_url":"https://api.github.com/users/cvalarida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvalarida/subscriptions","organizations_url":"https://api.github.com/users/cvalarida/orgs","repos_url":"https://api.github.com/users/cvalarida/repos","events_url":"https://api.github.com/users/cvalarida/events{/privacy}","received_events_url":"https://api.github.com/users/cvalarida/received_events","type":"User","site_admin":false},"body":"The connected ticket is a bit ambiguous, so I'll explain more of what's going on here.\r\n\r\nThis work allows the type ahead field to accept a `getOptions` callback which can be called whenever input is updated. By supplying `setData` to the callback, we can debounce the function so it's not called _every_ keystroke.\r\n\r\nWe needed this for the facility names because the list is unreasonably long to store everything in the front end. Instead, we'll fetch the new list of options when the user is done typing.","created_at":"2018-05-10T22:16:17Z","updated_at":"2018-05-22T22:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88e093c4fd91520af13c23cfd7655cbbf50c1001","assignee":{"login":"jbalboni","id":634932,"avatar_url":"https://avatars2.githubusercontent.com/u/634932?v=4","gravatar_id":"","url":"https://api.github.com/users/jbalboni","html_url":"https://github.com/jbalboni","followers_url":"https://api.github.com/users/jbalboni/followers","following_url":"https://api.github.com/users/jbalboni/following{/other_user}","gists_url":"https://api.github.com/users/jbalboni/gists{/gist_id}","starred_url":"https://api.github.com/users/jbalboni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbalboni/subscriptions","organizations_url":"https://api.github.com/users/jbalboni/orgs","repos_url":"https://api.github.com/users/jbalboni/repos","events_url":"https://api.github.com/users/jbalboni/events{/privacy}","received_events_url":"https://api.github.com/users/jbalboni/received_events","type":"User","site_admin":false},"assignees":[{"login":"jbalboni","id":634932,"avatar_url":"https://avatars2.githubusercontent.com/u/634932?v=4","gravatar_id":"","url":"https://api.github.com/users/jbalboni","html_url":"https://github.com/jbalboni","followers_url":"https://api.github.com/users/jbalboni/followers","following_url":"https://api.github.com/users/jbalboni/following{/other_user}","gists_url":"https://api.github.com/users/jbalboni/gists{/gist_id}","starred_url":"https://api.github.com/users/jbalboni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbalboni/subscriptions","organizations_url":"https://api.github.com/users/jbalboni/orgs","repos_url":"https://api.github.com/users/jbalboni/repos","events_url":"https://api.github.com/users/jbalboni/events{/privacy}","received_events_url":"https://api.github.com/users/jbalboni/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"markgreenburg","id":24251447,"avatar_url":"https://avatars0.githubusercontent.com/u/24251447?v=4","gravatar_id":"","url":"https://api.github.com/users/markgreenburg","html_url":"https://github.com/markgreenburg","followers_url":"https://api.github.com/users/markgreenburg/followers","following_url":"https://api.github.com/users/markgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/markgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/markgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markgreenburg/subscriptions","organizations_url":"https://api.github.com/users/markgreenburg/orgs","repos_url":"https://api.github.com/users/markgreenburg/repos","events_url":"https://api.github.com/users/markgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/markgreenburg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":390338014,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels/front%20end","name":"front end","color":"FFE6FD","default":false},{"id":611804104,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels/unicorns","name":"unicorns","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7719/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/10924f572cedea49726f3b805929ac90d9a15396","head":{"label":"department-of-veterans-affairs:autosuggest-features-cv","ref":"autosuggest-features-cv","sha":"10924f572cedea49726f3b805929ac90d9a15396","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2018-05-22T19:33:56Z","pushed_at":"2018-05-22T22:14:04Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":145793,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0"},"forks":55,"open_issues":81,"watchers":111,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"b68065aa336e165afe1c1728324ac984d8946601","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2018-05-22T19:33:56Z","pushed_at":"2018-05-22T22:14:04Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":145793,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":81,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0"},"forks":55,"open_issues":81,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/7719"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7719"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7719/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7719/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/10924f572cedea49726f3b805929ac90d9a15396"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cehsu"}}