From 472a9ecde232e6045064608e115f3b659e721200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:54:59 +0300 Subject: [PATCH] Fixed #16227 - Autocomplete: Error when deleting input text if virtualscroll is enabled --- src/app/components/autocomplete/autocomplete.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts index 1d84aae7b80..a4156236239 100755 --- a/src/app/components/autocomplete/autocomplete.ts +++ b/src/app/components/autocomplete/autocomplete.ts @@ -1103,9 +1103,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr if (query.length === 0 && !this.multiple && !this.completeOnFocus) { this.onClear.emit(); - setTimeout(() => { - this.hide(); - }); + this.hide(); } else { if (query.length >= this.minLength) { this.focusedOptionIndex.set(-1);