mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
111731: Minimize all the facets when adding filter through advanced component & filter suggestions
This commit is contained in:
@@ -97,6 +97,7 @@ export class AdvancedSearchComponent implements OnInit, OnDestroy {
|
||||
|
||||
applyFilter(): void {
|
||||
if (isNotEmpty(this.currentValue)) {
|
||||
this.searchFilterService.minimizeAll();
|
||||
this.subs.push(this.searchConfigurationService.selectNewAppliedFilterParams(this.currentFilter, this.currentValue.trim(), this.currentOperator).pipe(take(1)).subscribe((params: Params) => {
|
||||
void this.router.navigate([this.searchService.getSearchLink()], {
|
||||
queryParams: params,
|
||||
|
@@ -212,6 +212,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
protected applyFilterValue(data: string): void {
|
||||
if (data.match(new RegExp(`^.+,(equals|query|authority)$`))) {
|
||||
this.filterService.minimizeAll();
|
||||
const valueParts = data.split(',');
|
||||
this.subs.push(this.searchConfigService.selectNewAppliedFilterParams(this.filterConfig.name, valueParts.slice(0, valueParts.length - 1).join(), valueParts[valueParts.length - 1]).pipe(take(1)).subscribe((params: Params) => {
|
||||
void this.router.navigate(this.getSearchLinkParts(), {
|
||||
|
@@ -71,4 +71,7 @@ export class SearchFilterServiceStub {
|
||||
resetPage(_filterName: string): void {
|
||||
}
|
||||
|
||||
minimizeAll(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user