No need to subscribe anymore to the router events

This commit is contained in:
Sergio Fernández Celorio
2025-04-11 11:39:41 +02:00
parent 4f42c1e95f
commit dc3e842747

View File

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