From 043b92fbc7b91157c98b8b230d2033ba13cfec30 Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Mon, 19 Sep 2022 13:17:04 -0400 Subject: [PATCH] Make sure pagination is initialized in derived classes. --- .../browse-by-metadata-page.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts index 70408d3a85..20817d9675 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts @@ -115,14 +115,14 @@ export class BrowseByMetadataPageComponent implements OnInit { protected paginationService: PaginationService, protected router: Router, @Inject(APP_CONFIG) protected appConfig: AppConfig) { - } - - ngOnInit(): void { this.paginationConfig = Object.assign(new PaginationComponentOptions(), { id: BBM_PAGINATION_ID, currentPage: 1, pageSize: this.appConfig.browseBy.pageSize, }); + } + + ngOnInit(): void { const sortConfig = new SortOptions('default', SortDirection.ASC); this.updatePage(new BrowseEntrySearchOptions(this.defaultBrowseId, this.paginationConfig, sortConfig)); this.currentPagination$ = this.paginationService.getCurrentPagination(this.paginationConfig.id, this.paginationConfig);