Skip to content

Commit c2528a9

Browse files
committed
Filters disappeared on reload
1 parent 99840ba commit c2528a9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/app/shared/search/search-filters/search-filters.component.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,16 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
8888
}
8989

9090
ngOnInit(): void {
91-
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(
92-
tap(() => this.filtersWithComputedVisibility = 0),
93-
map((filters) => {
94-
Object.keys(filters).forEach((f) => filters[f] = null);
95-
return filters;
96-
})
97-
);
98-
this.searchLink = this.getSearchLink();
91+
this.router.events.subscribe(() => {
92+
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(
93+
tap(() => this.filtersWithComputedVisibility = 0),
94+
map((filters) => {
95+
Object.keys(filters).forEach((f) => filters[f] = null);
96+
return filters;
97+
})
98+
);
99+
this.searchLink = this.getSearchLink();
100+
});
99101
}
100102

101103
/**

0 commit comments

Comments
 (0)