diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.ts b/src/app/shared/search/search-labels/search-label/search-label.component.ts index 74526ad2ad..ab4c57d9f5 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.ts @@ -7,6 +7,7 @@ import { SearchService } from '../../../../core/shared/search/search.service'; import { currentPath } from '../../../utils/route.utils'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service'; +import { stripOperatorFromFilterValue } from '../../search.utils'; @Component({ selector: 'ds-search-label', @@ -83,7 +84,8 @@ export class SearchLabelComponent implements OnInit { normalizeFilterValue(value: string) { // const pattern = /,[^,]*$/g; const pattern = /,authority*$/g; - return value.replace(pattern, ''); + value = value.replace(pattern, ''); + return stripOperatorFromFilterValue(value); } private getFilterName(): string { diff --git a/src/app/shared/search/search-labels/search-labels.component.ts b/src/app/shared/search/search-labels/search-labels.component.ts index 8f77d73b21..2cc1919f50 100644 --- a/src/app/shared/search/search-labels/search-labels.component.ts +++ b/src/app/shared/search/search-labels/search-labels.component.ts @@ -4,7 +4,6 @@ import { Observable } from 'rxjs'; import { Params, Router } from '@angular/router'; import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service'; import { map } from 'rxjs/operators'; -import { stripOperatorFromFilterValue } from '../search.utils'; @Component({ selector: 'ds-search-labels', @@ -37,7 +36,7 @@ export class SearchLabelsComponent { const labels = {}; Object.keys(params) .forEach((key) => { - labels[key] = [...params[key].map((value) => stripOperatorFromFilterValue(value))]; + labels[key] = [...params[key].map((value) => value)]; }); return labels; })