mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
fixed an issue where the matrix URL pagination params would still be used
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<h2>{{'home.top-level-communities.head' | translate}}</h2>
|
||||
<p class="lead">{{'home.top-level-communities.help' | translate}}</p>
|
||||
<ds-object-list [config]="config" [sortConfig]="sortConfig"
|
||||
[objects]="topLevelCommunities" [hideGear]="false"
|
||||
[objects]="topLevelCommunities" [hideGear]="true"
|
||||
(pageChange)="onPageChange($event)"
|
||||
(pageSizeChange)="onPageSizeChange($event)"
|
||||
(sortDirectionChange)="onSortDirectionChange($event)"
|
||||
|
@@ -57,6 +57,7 @@ export class TopLevelCommunityListComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateResults() {
|
||||
this.topLevelCommunities = undefined;
|
||||
this.topLevelCommunities = this.cds.findAll({ currentPage: this.config.currentPage, elementsPerPage: this.config.pageSize, sort: this.sortConfig });
|
||||
this.ref.detectChanges();
|
||||
}
|
||||
|
@@ -307,13 +307,16 @@ export class PaginationComponent implements OnDestroy, OnInit {
|
||||
if (!isNumeric(page) || !filteredPageSize) {
|
||||
let filteredPage = isNumeric(page) ? page : this.currentPage;
|
||||
filteredPageSize = (filteredPageSize) ? filteredPageSize : this.pageSize;
|
||||
this.router.navigate([{
|
||||
this.router.navigate([], {
|
||||
queryParams: {
|
||||
pageId: this.id,
|
||||
page: filteredPage,
|
||||
pageSize: filteredPageSize,
|
||||
sortDirection: sortDirection,
|
||||
sortField: sortField
|
||||
}]);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// (+) converts string to a number
|
||||
this.currentPage = +page;
|
||||
|
Reference in New Issue
Block a user