74606: Move stripping of suggestions to SearchFacetFilter

This commit is contained in:
Kristof De Langhe
2020-11-18 17:59:22 +01:00
parent 05406e6919
commit cb6381f7ee
2 changed files with 1 additions and 11 deletions

View File

@@ -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))
}
})
}

View File

@@ -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));
}
}