mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
CST-6056 changes for filter result not working while lookup from text input
This commit is contained in:
@@ -250,8 +250,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
||||
this.filter = '';
|
||||
}
|
||||
this.filterSearchResults = observableOf([]);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
[name]="filterConfig.paramName"
|
||||
[(ngModel)]="filter"
|
||||
(submitSuggestion)="onSubmit($event)"
|
||||
(clickSuggestion)="onClick($event)"
|
||||
(clickSuggestion)="onSubmit($event)"
|
||||
(findSuggestions)="findSuggestions($event)"
|
||||
ngDefaultControl
|
||||
></ds-filter-input-suggestions>
|
||||
|
@@ -3,6 +3,7 @@ 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';
|
||||
import { InputSuggestion } from '../../../../input-suggestions/input-suggestions.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-search-hierarchy-filter',
|
||||
@@ -22,6 +23,8 @@ export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent i
|
||||
* @param data The string from the input field
|
||||
*/
|
||||
onSubmit(data: any) {
|
||||
super.onSubmit(addOperatorToFilterValue(data, 'query'));
|
||||
this.filterSearchResults.subscribe((filterSearchResults: InputSuggestion[]) => {
|
||||
super.onSubmit(addOperatorToFilterValue(data, filterSearchResults.length ? 'equals' : 'query'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
[name]="filterConfig.paramName"
|
||||
[(ngModel)]="filter"
|
||||
(submitSuggestion)="onSubmit($event)"
|
||||
(clickSuggestion)="onClick($event)"
|
||||
(clickSuggestion)="onSubmit($event)"
|
||||
(findSuggestions)="findSuggestions($event)"
|
||||
ngDefaultControl></ds-filter-input-suggestions>
|
||||
</div>
|
||||
|
@@ -3,6 +3,7 @@ import { FilterType } from '../../../models/filter-type.model';
|
||||
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
||||
import { renderFacetFor } from '../search-filter-type-decorator';
|
||||
import { addOperatorToFilterValue, } from '../../../search.utils';
|
||||
import { InputSuggestion } from '../../../../input-suggestions/input-suggestions.model';
|
||||
|
||||
/**
|
||||
* This component renders a simple item page.
|
||||
@@ -28,6 +29,8 @@ export class SearchTextFilterComponent extends SearchFacetFilterComponent implem
|
||||
* @param data The string from the input field
|
||||
*/
|
||||
onSubmit(data: any) {
|
||||
super.onSubmit(addOperatorToFilterValue(data, 'query'));
|
||||
this.filterSearchResults.subscribe((filterSearchResults: InputSuggestion[]) => {
|
||||
super.onSubmit(addOperatorToFilterValue(data, filterSearchResults.length ? 'equals' : 'query'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user