111731: Fixed scope not correctly resetting to no scope when clicking on "Search all of DSpace" in the search scope selector

This commit is contained in:
Alexandre Vryghem
2024-05-07 14:49:52 +02:00
parent ede5f4325a
commit fd6d470b3f
2 changed files with 2 additions and 1 deletions

View File

@@ -294,6 +294,7 @@ describe('SearchComponent', () => {
const expectedSearchOptions = Object.assign(paginatedSearchOptions$.value, { const expectedSearchOptions = Object.assign(paginatedSearchOptions$.value, {
configuration: 'default', configuration: 'default',
scope: '',
sort: sortOptionsList[0], sort: sortOptionsList[0],
}); });
expect(comp.currentConfiguration$).toBeObservable(cold('b', { expect(comp.currentConfiguration$).toBeObservable(cold('b', {

View File

@@ -356,7 +356,7 @@ export class SearchComponent implements OnDestroy, OnInit {
} }
this.currentScope$ = this.routeService.getQueryParameterValue('scope').pipe( 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(); this.isSidebarCollapsed$ = this.isSidebarCollapsed();