mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
load compleate on search products compleate
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<!-- [style.padding.px]="30" -->
|
||||
<app-loading
|
||||
loading="true"
|
||||
loading="loading"
|
||||
text="Inhalte werden geladen"
|
||||
></app-loading>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,7 @@ import { ProductMapping } from 'src/app/core/mappings/product.mapping';
|
||||
export class SearchResultsComponent implements OnInit {
|
||||
currentSearch: Search;
|
||||
products: Product[];
|
||||
loading = true;
|
||||
@Select(ProcessState.getProducts) products$: Observable<ItemDTO[]>;
|
||||
skip = 0;
|
||||
|
||||
@@ -30,7 +31,7 @@ export class SearchResultsComponent implements OnInit {
|
||||
private store: Store,
|
||||
private router: Router,
|
||||
private productMapping: ProductMapping
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.loadCurrentSearch();
|
||||
@@ -67,6 +68,9 @@ export class SearchResultsComponent implements OnInit {
|
||||
filter(f => Array.isArray(f)),
|
||||
map(items => items.map(item => this.productMapping.fromItemDTO(item)))
|
||||
)
|
||||
.subscribe(data => (this.products = data));
|
||||
.subscribe(
|
||||
data => (this.products = data),
|
||||
() => this.loading = false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user