From cb20a31379be97d7533bf334c8e5f91b9b86f3fc Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Fri, 7 Sep 2018 12:05:22 +0200 Subject: [PATCH] Fixed Browse-By-Title sort direction --- .../+browse-by-title-page/browse-by-title-page.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts index 3205091952..1759264e2a 100644 --- a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts +++ b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.ts @@ -54,14 +54,15 @@ export class BrowseByTitlePageComponent implements OnInit { .subscribe((params) => { const page = +params.page || this.paginationConfig.currentPage; const pageSize = +params.pageSize || this.paginationConfig.pageSize; - const sortDirection = +params.page || this.sortConfig.direction; + const sortDirection = params.sortDirection || this.sortConfig.direction; + const sortField = params.sortField || this.sortConfig.field; const pagination = Object.assign({}, this.paginationConfig, { currentPage: page, pageSize: pageSize } ); const sort = Object.assign({}, this.sortConfig, - { direction: sortDirection, field: params.sortField } + { direction: sortDirection, field: sortField } ); this.updatePage({ pagination: pagination,