Skip to content

Commit

Permalink
Merge pull request #15720 from robGardiner01/fix-autocomplete-empty-m…
Browse files Browse the repository at this point in the history
…essage

FIX - Autocomplete: Showing empty overlay when has no suggestions and showEmptyMessage is false
  • Loading branch information
cetincakiroglu authored May 30, 2024
2 parents ecc37a8 + c7737c0 commit 7c2e913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr

handleSuggestionsChange() {
if (this.loading) {
this._suggestions() ? this.show() : !!this.emptyTemplate ? this.show() : this.hide();
this._suggestions().length > 0 || this.showEmptyMessage ? this.show() : !!this.emptyTemplate ? this.show() : this.hide();
const focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
this.focusedOptionIndex.set(focusedOptionIndex);
this.suggestionsUpdated = true;
Expand Down

0 comments on commit 7c2e913

Please sign in to comment.