Revision 58497
Added by Konstantina Galouni about 4 years ago
entitiesAutoComplete.component.ts | ||
---|---|---|
5 | 5 |
import {Value} from '../../searchPages/searchUtils/searchHelperClasses.class'; |
6 | 6 |
import {EntitiesSearchService} from './entitySearch.service'; |
7 | 7 |
import{EnvProperties} from '../properties/env-properties'; |
8 |
import {StringUtils} from "../string-utils.class"; |
|
8 | 9 |
|
9 | 10 |
|
10 | 11 |
//Usage example |
... | ... | |
129 | 130 |
debounceTime(300), |
130 | 131 |
distinctUntilChanged(), |
131 | 132 |
switchMap((term: string) => { |
132 |
var results = this._search.searchByType(term, this.entityType, this.properties);
|
|
133 |
var results = this._search.searchByType(StringUtils.URIEncode(term), this.entityType, this.properties);
|
|
133 | 134 |
this.showLoading = false; |
134 | 135 |
this.results = results.length; |
135 | 136 |
return results; |
Also available in: Unified diff
[Trunk | Library]:
1. entitiesAutoComplete.component.ts: [Bug fix] Add missing encoding in autocomplete term (problem when query uses cache).
2. newSearchPage.component.ts:
a. [Bug fix] Add missing keyword encoding for simple search form (problem when query uses cache).
b. [Bug fix] In advanced search, when "all fields" (field id="q") is added more than once in form, add both values (params "+=" and not "=" in "getSearchAPIQueryForAdvancedSearhField()" method).
3. searchAll.component.ts: Decode keyword parameter from url (to show it properly in search form).
4. searchAll.component.ts:
a. [Bug fix] Add missing encoding in search term, used by datacite, crossref and orcid search services (problem when query uses cache).
b. In methods of crossref service pass properties, instead of url - url will be built in service.
5. searchCrossref.service.ts:
a. In all methods, pass properties, instead of url.
b. Use cache when available.
6. ISVocabularies.service.ts: [Bug fix]: Return "accessMode.json" vocabulary when: entity == "result" (case added in if statement).