Skip to content
Snippets Groups Projects
Commit 551ed18f authored by Kristof De Langhe's avatar Kristof De Langhe
Browse files

59415: Allow scope in browse-by-value

parent 0312e659
No related merge requests found
...@@ -149,6 +149,7 @@ export class BrowseService { ...@@ -149,6 +149,7 @@ export class BrowseService {
getBrowseItemsFor(definitionID: string, filterValue: string, options: { getBrowseItemsFor(definitionID: string, filterValue: string, options: {
pagination?: PaginationComponentOptions; pagination?: PaginationComponentOptions;
sort?: SortOptions; sort?: SortOptions;
scope?: string;
} = {}): Observable<RemoteData<PaginatedList<Item>>> { } = {}): Observable<RemoteData<PaginatedList<Item>>> {
const request$ = this.getBrowseDefinitions().pipe( const request$ = this.getBrowseDefinitions().pipe(
getBrowseDefinitionLinks(definitionID), getBrowseDefinitionLinks(definitionID),
...@@ -157,6 +158,9 @@ export class BrowseService { ...@@ -157,6 +158,9 @@ export class BrowseService {
hasValueOperator(), hasValueOperator(),
map((href: string) => { map((href: string) => {
const args = []; const args = [];
if (isNotEmpty(options.sort)) {
args.push(`scope=${options.scope}`);
}
if (isNotEmpty(options.sort)) { if (isNotEmpty(options.sort)) {
args.push(`sort=${options.sort.field},${options.sort.direction}`); args.push(`sort=${options.sort.field},${options.sort.direction}`);
} }
......
<div class="d-flex flex-row"> <div class="d-flex flex-row">
<a [routerLink]="" [queryParams]="{value: object.value}" class="lead"> <a [routerLink]="" [queryParams]="{value: object.value}" [queryParamsHandling]="'merge'" class="lead">
{{object.value}} {{object.value}}
</a> </a>
<span class="pr-2">&nbsp;</span> <span class="pr-2">&nbsp;</span>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment