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