Browse Source

Improve loading state

pull/7739/head
Thomas Kaul 2 days ago
parent
commit
a9f9cabf1c
  1. 4
      libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts

4
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts

@ -128,6 +128,7 @@ export class GfSymbolAutocompleteComponent
map((query) => {
return isString(query) ? query.trim() : query;
}),
distinctUntilChanged(),
filter((query) => {
if (query?.length === 0) {
this.showDefaultOptions();
@ -137,13 +138,12 @@ export class GfSymbolAutocompleteComponent
return isString(query);
}),
debounceTime(400),
distinctUntilChanged(),
tap(() => {
this.isLoading = true;
this.changeDetectorRef.markForCheck();
}),
debounceTime(400),
takeUntilDestroyed(this.destroyRef),
switchMap((query: string) => {
return this.dataService.fetchSymbols({

Loading…
Cancel
Save