fixed an issue where the matrix URL pagination params would still be used

This commit is contained in:
Art Lowel
2017-06-21 16:44:49 +02:00
parent 96f3100288
commit 9ab1750ca6
3 changed files with 9 additions and 5 deletions

View File

@@ -305,15 +305,18 @@ export class PaginationComponent implements OnDestroy, OnInit {
private validateParams(page: any, pageSize: any, sortDirection: any, sortField: any) {
let filteredPageSize = this.pageSizeOptions.find(x => x == pageSize);
if (!isNumeric(page) || !filteredPageSize) {
let filteredPage = isNumeric(page) ? page : this.currentPage;
filteredPageSize = (filteredPageSize) ? filteredPageSize : this.pageSize;
this.router.navigate([{
let filteredPage = isNumeric(page) ? page : this.currentPage;
filteredPageSize = (filteredPageSize) ? filteredPageSize : this.pageSize;
this.router.navigate([], {
queryParams: {
pageId: this.id,
page: filteredPage,
pageSize: filteredPageSize,
sortDirection: sortDirection,
sortField: sortField
}]);
}
}
);
} else {
// (+) converts string to a number
this.currentPage = +page;