[ADF-2045] Pagination is not working properly on Search Results Page (#2744)

This commit is contained in:
Eugenio Romano
2017-11-28 12:46:01 +00:00
committed by GitHub
parent ee901b6641
commit c763ba45e0
11 changed files with 58 additions and 62 deletions

View File

@@ -174,7 +174,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
noPermission: boolean = false;
selection = new Array<MinimalNodeEntity>();
// PaginatedComponent implementation
pagination = new Subject<Pagination>();
private layoutPresets = {};
@@ -282,6 +281,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
if (changes.node && changes.node.currentValue) {
this.resetSelection();
this.data.loadPage(changes.node.currentValue);
this.pagination.next(changes.node.currentValue.list.pagination);
} else if (changes.rowFilter) {
this.data.setFilter(changes.rowFilter.currentValue);
if (this.currentFolderId) {
@@ -862,7 +862,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
}
}
// PaginatedComponent implementation
updatePagination(params: PaginationQueryParams) {
const needsReload = this.maxItems !== params.maxItems || this.skipCount !== params.skipCount;
@@ -874,7 +873,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
}
}
// PaginatedComponent implementation
get supportedPageSizes(): number[] {
return this.appConfig.get('document-list.supportedPageSizes', [5, 10, 15, 25]);
}