mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
90768: Appended query operator to the filter
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { FilterType } from '../../../models/filter-type.model';
|
||||
import { renderFacetFor } from '../search-filter-type-decorator';
|
||||
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
||||
import { addOperatorToFilterValue } from '../../../search.utils';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-search-hierarchy-filter',
|
||||
@@ -15,4 +16,12 @@ import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/se
|
||||
*/
|
||||
@renderFacetFor(FilterType.hierarchy)
|
||||
export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent implements OnInit {
|
||||
/**
|
||||
* Submits a new active custom value to the filter from the input field
|
||||
* Overwritten method from parent component, adds the "query" operator to the received data before passing it on
|
||||
* @param data The string from the input field
|
||||
*/
|
||||
onSubmit(data: any) {
|
||||
super.onSubmit(addOperatorToFilterValue(data, 'query'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user