mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
74606: Move stripping of suggestions to SearchFacetFilter
This commit is contained in:
@@ -288,7 +288,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
||||
return rd.payload.page.map((facet) => {
|
||||
return {
|
||||
displayValue: this.getDisplayValue(facet, data),
|
||||
value: this.getFacetValue(facet)
|
||||
value: stripOperatorFromFilterValue(this.getFacetValue(facet))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@ import {
|
||||
import { renderFacetFor } from '../search-filter-type-decorator';
|
||||
import {
|
||||
addOperatorToFilterValue,
|
||||
stripOperatorFromFilterValue
|
||||
} from '../../../search.utils';
|
||||
|
||||
/**
|
||||
@@ -36,13 +35,4 @@ export class SearchTextFilterComponent extends SearchFacetFilterComponent implem
|
||||
onSubmit(data: any) {
|
||||
super.onSubmit(addOperatorToFilterValue(data, 'query'));
|
||||
}
|
||||
|
||||
/**
|
||||
* On click, set the input's value to the clicked data
|
||||
* Overwritten method from parent component, strips any operator from the received data before passing it on
|
||||
* @param data The value of the option that was clicked
|
||||
*/
|
||||
onClick(data: any) {
|
||||
super.onClick(stripOperatorFromFilterValue(data));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user