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 { ngOnInit(): void {
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe( this.router.events.subscribe(() => {
tap(() => this.filtersWithComputedVisibility = 0), this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(
map((filters) => { tap(() => this.filtersWithComputedVisibility = 0),
Object.keys(filters).forEach((f) => filters[f] = null); map((filters) => {
return filters; Object.keys(filters).forEach((f) => filters[f] = null);
}) return filters;
); })
this.searchLink = this.getSearchLink(); );
this.searchLink = this.getSearchLink();
});
} }
/** /**