w2p-85847 Add Authority to browse indexes

This commit is contained in:
Nathan Buckingham
2021-12-13 13:48:09 -05:00
parent 768de1a1e7
commit e2614b9dad
7 changed files with 45 additions and 9 deletions

View File

@@ -105,7 +105,7 @@ export class BrowseService {
* @param options Options to narrow down your search
* @returns {Observable<RemoteData<PaginatedList<Item>>>}
*/
getBrowseItemsFor(filterValue: string, options: BrowseEntrySearchOptions): Observable<RemoteData<PaginatedList<Item>>> {
getBrowseItemsFor(filterValue: string, filterAuthority: string, options: BrowseEntrySearchOptions): Observable<RemoteData<PaginatedList<Item>>> {
const href$ = this.getBrowseDefinitions().pipe(
getBrowseDefinitionLinks(options.metadataDefinition),
hasValueOperator(),
@@ -132,6 +132,9 @@ export class BrowseService {
if (isNotEmpty(filterValue)) {
args.push(`filterValue=${encodeURIComponent(filterValue)}`);
}
if (isNotEmpty(filterAuthority)) {
args.push(`filterAuthority=${encodeURIComponent(filterAuthority)}`);
}
if (isNotEmpty(args)) {
href = new URLCombiner(href, `?${args.join('&')}`).toString();
}