{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material2/pulls/comments/195147811","pull_request_review_id":128456399,"id":195147811,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTE0NzgxMQ==","diff_hunk":"@@ -431,7 +431,9 @@ export class MatAutocompleteTrigger implements ControlValueAccessor, OnDestroy {\n   private _subscribeToClosingActions(): Subscription {\n     const firstStable = this._zone.onStable.asObservable().pipe(take(1));\n     const optionChanges = this.autocomplete.options.changes.pipe(\n-      tap(() => this._positionStrategy.reapplyLastPosition()),\n+      // Adding/removing options may mean the overlay now exceeds the viewport,\n+      // so update its position\n+      tap(() => this._overlayRef!.updatePosition()),","path":"src/lib/autocomplete/autocomplete-trigger.ts","position":7,"original_position":7,"commit_id":"577548c808e2f1226c285ad7d3efc1e0f8036c68","original_commit_id":"577548c808e2f1226c285ad7d3efc1e0f8036c68","user":{"login":"dpalita","id":1738425,"node_id":"MDQ6VXNlcjE3Mzg0MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1738425?v=4","gravatar_id":"","url":"https://api.github.com/users/dpalita","html_url":"https://github.com/dpalita","followers_url":"https://api.github.com/users/dpalita/followers","following_url":"https://api.github.com/users/dpalita/following{/other_user}","gists_url":"https://api.github.com/users/dpalita/gists{/gist_id}","starred_url":"https://api.github.com/users/dpalita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpalita/subscriptions","organizations_url":"https://api.github.com/users/dpalita/orgs","repos_url":"https://api.github.com/users/dpalita/repos","events_url":"https://api.github.com/users/dpalita/events{/privacy}","received_events_url":"https://api.github.com/users/dpalita/received_events","type":"User","site_admin":false},"body":"I do have a similar use case : my options are added dynamically. If none is in cache when the panel initially opens, it contains a \"search in progress\" message. This is to inform the user that this field will have assistance soon.\r\nIf the field is in the bottom of the page, it is almost always outside of the viewport since it opens with a small initial panel.\r\nYou could maybe expose a reposition() method in the matAutocomplete API so that we could trigger it programmatically (instead of a configuration option). \r\nBetter still, the position strategy could choose to change position only if the content doesn't fit in the current one : in your example were the options change back and forth with the user input it would only jump once.\r\n\r\nI understand the need for the smallest possible API surface and the consideration of the majority where several consecutive jumps would ruin the user experience, but a piece of UI that is inaccessible because it is outside of the viewport in my opinion (you wouldn't write in the docs that an autocomplete cannot be placed less than its maximum height from the bottom of the viewport when its content changes dynamically). ","created_at":"2018-06-13T16:16:28Z","updated_at":"2018-06-13T16:16:29Z","html_url":"https://github.com/angular/material2/pull/11495#discussion_r195147811","pull_request_url":"https://api.github.com/repos/angular/material2/pulls/11495","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/comments/195147811"},"html":{"href":"https://github.com/angular/material2/pull/11495#discussion_r195147811"},"pull_request":{"href":"https://api.github.com/repos/angular/material2/pulls/11495"}},"in_reply_to_id":190662760},"pull_request":{"url":"https://api.github.com/repos/angular/material2/pulls/11495","id":190358497,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwMzU4NDk3","html_url":"https://github.com/angular/material2/pull/11495","diff_url":"https://github.com/angular/material2/pull/11495.diff","patch_url":"https://github.com/angular/material2/pull/11495.patch","issue_url":"https://api.github.com/repos/angular/material2/issues/11495","number":11495,"state":"open","locked":false,"title":"fix(autocomplete): update overlay position when options are changed","user":{"login":"benelliott","id":4996462,"node_id":"MDQ6VXNlcjQ5OTY0NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4996462?v=4","gravatar_id":"","url":"https://api.github.com/users/benelliott","html_url":"https://github.com/benelliott","followers_url":"https://api.github.com/users/benelliott/followers","following_url":"https://api.github.com/users/benelliott/following{/other_user}","gists_url":"https://api.github.com/users/benelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/benelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benelliott/subscriptions","organizations_url":"https://api.github.com/users/benelliott/orgs","repos_url":"https://api.github.com/users/benelliott/repos","events_url":"https://api.github.com/users/benelliott/events{/privacy}","received_events_url":"https://api.github.com/users/benelliott/received_events","type":"User","site_admin":false},"body":"Ensures that changes to the autocomplete options will cause the component to check that its current\r\noverlay position is still within the viewport so that the overlay can fall back to the above\r\nposition, if necessary, while the panel is still open.\r\n\r\nFixes #11492","created_at":"2018-05-24T17:04:32Z","updated_at":"2018-06-13T16:16:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5289e26805ea534e7acf60c270749902a85b0e81","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":308798701,"node_id":"MDU6TGFiZWwzMDg3OTg3MDE=","url":"https://api.github.com/repos/angular/material2/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/angular/material2/pulls/11495/commits","review_comments_url":"https://api.github.com/repos/angular/material2/pulls/11495/comments","review_comment_url":"https://api.github.com/repos/angular/material2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material2/issues/11495/comments","statuses_url":"https://api.github.com/repos/angular/material2/statuses/577548c808e2f1226c285ad7d3efc1e0f8036c68","head":{"label":"benelliott:autocomplete-overlay-position","ref":"autocomplete-overlay-position","sha":"577548c808e2f1226c285ad7d3efc1e0f8036c68","user":{"login":"benelliott","id":4996462,"node_id":"MDQ6VXNlcjQ5OTY0NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4996462?v=4","gravatar_id":"","url":"https://api.github.com/users/benelliott","html_url":"https://github.com/benelliott","followers_url":"https://api.github.com/users/benelliott/followers","following_url":"https://api.github.com/users/benelliott/following{/other_user}","gists_url":"https://api.github.com/users/benelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/benelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benelliott/subscriptions","organizations_url":"https://api.github.com/users/benelliott/orgs","repos_url":"https://api.github.com/users/benelliott/repos","events_url":"https://api.github.com/users/benelliott/events{/privacy}","received_events_url":"https://api.github.com/users/benelliott/received_events","type":"User","site_admin":false},"repo":{"id":122325279,"node_id":"MDEwOlJlcG9zaXRvcnkxMjIzMjUyNzk=","name":"material2","full_name":"benelliott/material2","owner":{"login":"benelliott","id":4996462,"node_id":"MDQ6VXNlcjQ5OTY0NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/4996462?v=4","gravatar_id":"","url":"https://api.github.com/users/benelliott","html_url":"https://github.com/benelliott","followers_url":"https://api.github.com/users/benelliott/followers","following_url":"https://api.github.com/users/benelliott/following{/other_user}","gists_url":"https://api.github.com/users/benelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/benelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benelliott/subscriptions","organizations_url":"https://api.github.com/users/benelliott/orgs","repos_url":"https://api.github.com/users/benelliott/repos","events_url":"https://api.github.com/users/benelliott/events{/privacy}","received_events_url":"https://api.github.com/users/benelliott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benelliott/material2","description":"Material Design components for Angular","fork":true,"url":"https://api.github.com/repos/benelliott/material2","forks_url":"https://api.github.com/repos/benelliott/material2/forks","keys_url":"https://api.github.com/repos/benelliott/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benelliott/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benelliott/material2/teams","hooks_url":"https://api.github.com/repos/benelliott/material2/hooks","issue_events_url":"https://api.github.com/repos/benelliott/material2/issues/events{/number}","events_url":"https://api.github.com/repos/benelliott/material2/events","assignees_url":"https://api.github.com/repos/benelliott/material2/assignees{/user}","branches_url":"https://api.github.com/repos/benelliott/material2/branches{/branch}","tags_url":"https://api.github.com/repos/benelliott/material2/tags","blobs_url":"https://api.github.com/repos/benelliott/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benelliott/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benelliott/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/benelliott/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benelliott/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/benelliott/material2/languages","stargazers_url":"https://api.github.com/repos/benelliott/material2/stargazers","contributors_url":"https://api.github.com/repos/benelliott/material2/contributors","subscribers_url":"https://api.github.com/repos/benelliott/material2/subscribers","subscription_url":"https://api.github.com/repos/benelliott/material2/subscription","commits_url":"https://api.github.com/repos/benelliott/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/benelliott/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/benelliott/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/benelliott/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/benelliott/material2/contents/{+path}","compare_url":"https://api.github.com/repos/benelliott/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benelliott/material2/merges","archive_url":"https://api.github.com/repos/benelliott/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benelliott/material2/downloads","issues_url":"https://api.github.com/repos/benelliott/material2/issues{/number}","pulls_url":"https://api.github.com/repos/benelliott/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/benelliott/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/benelliott/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benelliott/material2/labels{/name}","releases_url":"https://api.github.com/repos/benelliott/material2/releases{/id}","deployments_url":"https://api.github.com/repos/benelliott/material2/deployments","created_at":"2018-02-21T11:01:51Z","updated_at":"2018-06-09T12:05:02Z","pushed_at":"2018-06-09T12:04:55Z","git_url":"git://github.com/benelliott/material2.git","ssh_url":"git@github.com:benelliott/material2.git","clone_url":"https://github.com/benelliott/material2.git","svn_url":"https://github.com/benelliott/material2","homepage":"https://material.angular.io","size":16066,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"69e4ca73a9256d286c9ae3e2d2e4bf3e29056313","user":{"login":"angular","id":139426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":49016322,"node_id":"MDEwOlJlcG9zaXRvcnk0OTAxNjMyMg==","name":"material2","full_name":"angular/material2","owner":{"login":"angular","id":139426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material2","description":"Material Design components for Angular","fork":false,"url":"https://api.github.com/repos/angular/material2","forks_url":"https://api.github.com/repos/angular/material2/forks","keys_url":"https://api.github.com/repos/angular/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material2/teams","hooks_url":"https://api.github.com/repos/angular/material2/hooks","issue_events_url":"https://api.github.com/repos/angular/material2/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material2/events","assignees_url":"https://api.github.com/repos/angular/material2/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material2/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material2/tags","blobs_url":"https://api.github.com/repos/angular/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material2/languages","stargazers_url":"https://api.github.com/repos/angular/material2/stargazers","contributors_url":"https://api.github.com/repos/angular/material2/contributors","subscribers_url":"https://api.github.com/repos/angular/material2/subscribers","subscription_url":"https://api.github.com/repos/angular/material2/subscription","commits_url":"https://api.github.com/repos/angular/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material2/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material2/merges","archive_url":"https://api.github.com/repos/angular/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material2/downloads","issues_url":"https://api.github.com/repos/angular/material2/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material2/labels{/name}","releases_url":"https://api.github.com/repos/angular/material2/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material2/deployments","created_at":"2016-01-04T18:50:02Z","updated_at":"2018-06-13T14:43:35Z","pushed_at":"2018-06-13T06:04:54Z","git_url":"git://github.com/angular/material2.git","ssh_url":"git@github.com:angular/material2.git","clone_url":"https://github.com/angular/material2.git","svn_url":"https://github.com/angular/material2","homepage":"https://material.angular.io","size":16362,"stargazers_count":14730,"watchers_count":14730,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3645,"mirror_url":null,"archived":false,"open_issues_count":1067,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3645,"open_issues":1067,"watchers":14730,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/11495"},"html":{"href":"https://github.com/angular/material2/pull/11495"},"issue":{"href":"https://api.github.com/repos/angular/material2/issues/11495"},"comments":{"href":"https://api.github.com/repos/angular/material2/issues/11495/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material2/pulls/11495/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material2/pulls/11495/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material2/statuses/577548c808e2f1226c285ad7d3efc1e0f8036c68"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dpalita"}}