From 750162bd40a2b3a1fca1eb60e8e9ec3429acb4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:08:41 +0300 Subject: [PATCH] Fixed #16063 - Autocomplete: with virtual scroll and item selected, it doesn't show items in dropdown and doesn't keep the selected item position when scrolling --- src/app/components/autocomplete/autocomplete.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts index 51a0a1186eb..7a4369ce482 100755 --- a/src/app/components/autocomplete/autocomplete.ts +++ b/src/app/components/autocomplete/autocomplete.ts @@ -1553,6 +1553,11 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr this.cd.markForCheck(); }; + // Added to adjust the scroller's content position when the dropdown closes. + if (this.virtualScroll) { + this.scroller.onScrollChange(event); + } + setTimeout(() => { _hide(); }, 0); // For ScreenReaders