Skip to content

Commit cf3b446

Browse files
FrancescoMolinaroAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2025_02_x/DSC-2776 (pull request DSpace#4258)
[CST-24671] fix clear params Approved-by: Andrea Barbasso
2 parents ea15660 + 59d9a74 commit cf3b446

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,11 @@ export class SearchFiltersComponent implements OnInit, AfterViewChecked, OnDestr
142142
if (!this.inPlaceSearch) {
143143
this.filterLabel = 'discover';
144144
}
145-
this.router.events.subscribe(() => {
146-
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(map((filters) => {
147-
Object.keys(filters).forEach((f) => filters[f] = null);
148-
return filters;
149-
}));
150-
this.searchLink = this.getSearchLink();
151-
});
145+
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(map((filters) => {
146+
Object.keys(filters).forEach((f) => filters[f] = null);
147+
return filters;
148+
}));
149+
this.searchLink = this.getSearchLink();
152150
}
153151

154152
/**

0 commit comments

Comments
 (0)