diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index e28265c03..4be556c77 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 776c400ed..1cdc11f5f 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -7269,4 +7269,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 8e0454ea2..7e37f0d8c 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 004de3cb4..3ca902aed 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -7269,4 +7269,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index bbf528098..c768cf1b9 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index 4a4b4b647..4e4e51635 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 0e51c5efa..b28898470 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index e5cae4fe8..1a47fecd9 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -7268,4 +7268,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index fb5d9ca18..5cb3a8894 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -6574,4 +6574,4 @@ - \ No newline at end of file + diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 8434b4d65..2c7c1e47c 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -7269,4 +7269,4 @@ - \ No newline at end of file + diff --git a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html index 31ceb5dad..cac15c346 100644 --- a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html +++ b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.html @@ -12,11 +12,6 @@ (optionSelected)="onUpdateSymbol($event)" > @if (!isLoading) { - @if (hasNoItemsPostLoading) { - Oops! Could not find any assets. - - } @for (lookupItem of filteredLookupItems; track lookupItem) { + } @empty { + @if (control.value?.length > 1) { + Oops! Could not find any assets. + + } } } diff --git a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts index d7e74157d..da97aac05 100644 --- a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts +++ b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts @@ -85,7 +85,6 @@ export class GfSymbolAutocompleteComponent @ViewChild('symbolAutocomplete') public symbolAutocomplete: MatAutocomplete; public control = new FormControl(); - public hasNoItemsPostLoading = false; public filteredLookupItems: (LookupItem & { assetSubClassString: string })[] = []; @@ -118,17 +117,17 @@ export class GfSymbolAutocompleteComponent this.control.valueChanges .pipe( - debounceTime(400), - distinctUntilChanged(), filter((query) => { return isString(query) && query.length > 1; }), - takeUntil(this.unsubscribeSubject), tap(() => { this.isLoading = true; this.changeDetectorRef.markForCheck(); }), + debounceTime(400), + distinctUntilChanged(), + takeUntil(this.unsubscribeSubject), switchMap((query: string) => { return this.dataService.fetchSymbols({ query, @@ -145,7 +144,6 @@ export class GfSymbolAutocompleteComponent }); this.isLoading = false; - this.hasNoItemsPostLoading = !this.filteredLookupItems.length; this.changeDetectorRef.markForCheck(); });