Skip to content

Commit c9f59e5

Browse files
FrancescoMolinaroAndrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2024_02_x/DSC-2776 (pull request DSpace#4257)
[DSC-2276] fix clear params Approved-by: Andrea Barbasso
2 parents e68a058 + f86c065 commit c9f59e5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,11 @@ export class SearchFiltersComponent implements OnInit, AfterViewChecked, OnDestr
137137
if (!this.inPlaceSearch) {
138138
this.filterLabel = 'discover';
139139
}
140-
this.router.events.subscribe(() => {
141-
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(map((filters) => {
142-
Object.keys(filters).forEach((f) => filters[f] = null);
143-
return filters;
144-
}));
145-
this.searchLink = this.getSearchLink();
146-
});
140+
this.clearParams = this.searchConfigService.getCurrentFrontendFilters().pipe(map((filters) => {
141+
Object.keys(filters).forEach((f) => filters[f] = null);
142+
return filters;
143+
}));
144+
this.searchLink = this.getSearchLink();
147145
}
148146

149147
/**

0 commit comments

Comments
 (0)