@@ -18,7 +18,10 @@ import {
1818 combineLatest as observableCombineLatest ,
1919 Observable ,
2020} from 'rxjs' ;
21- import { map } from 'rxjs/operators' ;
21+ import {
22+ map ,
23+ take ,
24+ } from 'rxjs/operators' ;
2225import { ThemedBrowseByComponent } from 'src/app/shared/browse-by/themed-browse-by.component' ;
2326
2427import {
@@ -53,7 +56,6 @@ import { VarDirective } from '../../shared/utils/var.directive';
5356import {
5457 BrowseByMetadataComponent ,
5558 browseParamsToOptions ,
56- getBrowseSearchOptions ,
5759} from '../browse-by-metadata/browse-by-metadata.component' ;
5860
5961@Component ( {
@@ -104,15 +106,18 @@ export class BrowseByDateComponent extends BrowseByMetadataComponent implements
104106 ngOnInit ( ) : void {
105107 const sortConfig = new SortOptions ( 'default' , SortDirection . ASC ) ;
106108 this . startsWithType = StartsWithType . date ;
107- // include the thumbnail configuration in browse search options
108- this . updatePage ( getBrowseSearchOptions ( this . defaultBrowseId , this . paginationConfig , sortConfig , this . fetchThumbnails ) ) ;
109109 this . currentPagination$ = this . paginationService . getCurrentPagination ( this . paginationConfig . id , this . paginationConfig ) ;
110110 this . currentSort$ = this . paginationService . getCurrentSort ( this . paginationConfig . id , sortConfig ) ;
111111 this . subs . push (
112- observableCombineLatest ( [ this . route . params , this . route . queryParams , this . scope$ , this . route . data ,
113- this . currentPagination$ , this . currentSort$ ] ) . pipe (
114- map ( ( [ routeParams , queryParams , scope , data , currentPage , currentSort ] ) => {
115- return [ Object . assign ( { } , routeParams , queryParams , data ) , scope , currentPage , currentSort ] ;
112+ observableCombineLatest (
113+ [ this . route . params . pipe ( take ( 1 ) ) ,
114+ this . route . queryParams ,
115+ this . scope$ ,
116+ this . currentPagination$ ,
117+ this . currentSort$ ,
118+ ] ) . pipe (
119+ map ( ( [ routeParams , queryParams , scope , currentPage , currentSort ] ) => {
120+ return [ Object . assign ( { } , routeParams , queryParams ) , scope , currentPage , currentSort ] ;
116121 } ) ,
117122 ) . subscribe ( ( [ params , scope , currentPage , currentSort ] : [ Params , string , PaginationComponentOptions , SortOptions ] ) => {
118123 const metadataKeys = params . browseDefinition ? params . browseDefinition . metadataKeys : this . defaultMetadataKeys ;
0 commit comments