Filters disappeared on reload

This commit is contained in:
ana
2025-03-13 09:51:17 +01:00
parent 99840ba3bc
commit c2528a9c1f

View File

@@ -88,14 +88,16 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
}
ngOnInit(): void {
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(
tap(() => this.filtersWithComputedVisibility = 0),
map((filters) => {
Object.keys(filters).forEach((f) => filters[f] = null);
return filters;
})
);
this.searchLink = this.getSearchLink();
this.router.events.subscribe(() => {
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(
tap(() => this.filtersWithComputedVisibility = 0),
map((filters) => {
Object.keys(filters).forEach((f) => filters[f] = null);
return filters;
})
);
this.searchLink = this.getSearchLink();
});
}
/**