Skip to content

Commit

Permalink
111731: Fixed scope not correctly resetting to no scope when clicking…
Browse files Browse the repository at this point in the history
… on "Search all of DSpace" in the search scope selector
  • Loading branch information
alexandrevryghem committed May 7, 2024
1 parent ede5f43 commit fd6d470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/shared/search/search.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ describe('SearchComponent', () => {

const expectedSearchOptions = Object.assign(paginatedSearchOptions$.value, {
configuration: 'default',
scope: '',
sort: sortOptionsList[0],
});
expect(comp.currentConfiguration$).toBeObservable(cold('b', {
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class SearchComponent implements OnDestroy, OnInit {
}

this.currentScope$ = this.routeService.getQueryParameterValue('scope').pipe(
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope),
map((routeValue: string) => hasValue(routeValue) ? routeValue : this.scope ?? ''),
);

this.isSidebarCollapsed$ = this.isSidebarCollapsed();
Expand Down

0 comments on commit fd6d470

Please sign in to comment.