74199: AuthorizedCollectionSelectorComponent current dso query fix

This commit is contained in:
Kristof De Langhe
2020-11-04 14:11:46 +01:00
parent b7aff5894a
commit 7bd7f38259
2 changed files with 15 additions and 1 deletions

View File

@@ -24,6 +24,13 @@ export class AuthorizedCollectionSelectorComponent extends DSOSelectorComponent
super(searchService);
}
/**
* Get a query to send for retrieving the current DSO
*/
getCurrentDSOQuery(): string {
return this.currentDSOId;
}
/**
* Perform a search for authorized collections with the current query and page
* @param query Query to search objects for

View File

@@ -131,7 +131,7 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
// Create an observable searching for the current DSO (return empty list if there's no current DSO)
let currentDSOResult$;
if (isNotEmpty(this.currentDSOId)) {
currentDSOResult$ = this.search(`search.resourceid:${this.currentDSOId}`, 1);
currentDSOResult$ = this.search(this.getCurrentDSOQuery(), 1);
} else {
currentDSOResult$ = observableOf(new PaginatedList(undefined, []));
}
@@ -175,6 +175,13 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
}));
}
/**
* Get a query to send for retrieving the current DSO
*/
getCurrentDSOQuery(): string {
return `search.resourceid:${this.currentDSOId}`;
}
/**
* Perform a search for the current query and page
* @param query Query to search objects for