Merge branch 'master' into metadata-and-relationships-combined-in-submission

This commit is contained in:
lotte
2020-02-05 10:54:49 +01:00
78 changed files with 3248 additions and 371 deletions

View File

@@ -15,6 +15,7 @@ import { getAllSucceededRemoteData, getRemoteDataPayload } from '../shared/opera
import { Injectable } from '@angular/core';
import { ExternalSource } from '../shared/external-source.model';
import { ExternalSourceEntry } from '../shared/external-source-entry.model';
import { RequestService } from './request.service';
/**
* A service for retrieving local and external entries information during a relation lookup
@@ -35,7 +36,8 @@ export class LookupRelationService {
});
constructor(protected externalSourceService: ExternalSourceService,
protected searchService: SearchService) {
protected searchService: SearchService,
protected requestService: RequestService) {
}
/**
@@ -92,4 +94,11 @@ export class LookupRelationService {
startWith(0)
);
}
/**
* Remove cached requests from local results
*/
removeLocalResultsCache() {
this.searchService.getEndpoint().subscribe((href) => this.requestService.removeByHrefSubstring(href));
}
}