Skip to content

Commit 314eb7e

Browse files
committed
Bug fixed for multiple search api call on search filter change and updated image place holder background
1 parent d4cdc13 commit 314eb7e

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/app/modules/search/components/search-results-container/components/search-result-item/search-result-item.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="product-base pointer" [routerLink]="['/', product.slug, product.id]">
22
<div class="product-image-container">
33
<picture class="img-responsive d-block bg-rand-{{ '' | random:1:10}}">
4-
<img [defaultImage]="noImageUrl" [lazyLoad]="getProductImageUrl(product)" [offset]="50" class="img-responsive w-100">
4+
<img [lazyLoad]="getProductImageUrl(product)" [offset]="50" class="img-responsive w-100">
55
</picture>
66
</div>
77
<div class="product-meta-info">

src/app/modules/search/pages/search-page/search-page.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class SearchPageComponent implements OnInit, OnDestroy {
3434
this.metaInfo = meta;
3535
}),
3636
this.route.queryParams.subscribe((params: SearchParam) => {
37-
this.updateFilters(this.searchService.convertToAppliedParams(params));
37+
this.search(this.searchService.convertToAppliedParams(params));
3838
})
3939
);
4040

@@ -44,7 +44,6 @@ export class SearchPageComponent implements OnInit, OnDestroy {
4444
this.appliedParams = appliedParams;
4545
const queryParams = this.searchService.convertToAPISearchParams(appliedParams);
4646
this.router.navigate(['/s'], { queryParams });
47-
this.search(appliedParams);
4847
}
4948

5049
search(appliedParams: SearchAppliedParams) {

src/assets/default/loader.gif

-307 Bytes
Binary file not shown.

src/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ $s-max: 70;
9999
$l-min: 30;
100100
$l-max: 90;
101101
@for $i from 1 through 20 {
102+
$rand-color: hsla(random(360), $s-min+random($s-max+-$s-min), $l-min+random($l-max+-$l-min), 0.3);
102103
.bg-rand-#{$i} {
103-
background-color: hsla(random(360), $s-min+random($s-max+-$s-min), $l-min+random($l-max+-$l-min), 0.3);
104+
background-image: radial-gradient($rand-color, #efefef);
104105
}
105106
}
106107

0 commit comments

Comments
 (0)