Browse Source
Task/improve loading state of symbol autocomplete component (#7739)
* Improve loading state
* Update changelog
pull/7743/head
Thomas Kaul
1 day ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
2 deletions
-
CHANGELOG.md
-
libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Improved the loading state of the symbol autocomplete component |
|
|
- Consolidated the duplicated translations of the asset classes and asset sub classes |
|
|
- Consolidated the duplicated translations of the asset classes and asset sub classes |
|
|
|
|
|
|
|
|
### Fixed |
|
|
### Fixed |
|
|
|
|
|
@ -128,6 +128,7 @@ export class GfSymbolAutocompleteComponent |
|
|
map((query) => { |
|
|
map((query) => { |
|
|
return isString(query) ? query.trim() : query; |
|
|
return isString(query) ? query.trim() : query; |
|
|
}), |
|
|
}), |
|
|
|
|
|
distinctUntilChanged(), |
|
|
filter((query) => { |
|
|
filter((query) => { |
|
|
if (query?.length === 0) { |
|
|
if (query?.length === 0) { |
|
|
this.showDefaultOptions(); |
|
|
this.showDefaultOptions(); |
|
|
@ -137,13 +138,12 @@ export class GfSymbolAutocompleteComponent |
|
|
|
|
|
|
|
|
return isString(query); |
|
|
return isString(query); |
|
|
}), |
|
|
}), |
|
|
debounceTime(400), |
|
|
|
|
|
distinctUntilChanged(), |
|
|
|
|
|
tap(() => { |
|
|
tap(() => { |
|
|
this.isLoading = true; |
|
|
this.isLoading = true; |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}), |
|
|
}), |
|
|
|
|
|
debounceTime(400), |
|
|
takeUntilDestroyed(this.destroyRef), |
|
|
takeUntilDestroyed(this.destroyRef), |
|
|
switchMap((query: string) => { |
|
|
switchMap((query: string) => { |
|
|
return this.dataService.fetchSymbols({ |
|
|
return this.dataService.fetchSymbols({ |
|
|
|