mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
let maxItems only if !this._pagination (#4079)
This commit is contained in:
committed by
Eugenio Romano
parent
411166605e
commit
96ddd4210c
@@ -295,23 +295,16 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
}
|
||||
|
||||
get pagination(): BehaviorSubject<PaginationModel> {
|
||||
let maxItems = this.preferences.paginationSize;
|
||||
|
||||
if (!this._pagination) {
|
||||
if (this.maxItems) {
|
||||
maxItems = this.maxItems;
|
||||
}
|
||||
|
||||
let maxItems = this.maxItems || this.preferences.paginationSize;
|
||||
let defaultPagination = <PaginationModel> {
|
||||
maxItems: maxItems,
|
||||
skipCount: 0,
|
||||
totalItems: 0,
|
||||
hasMoreItems: false
|
||||
};
|
||||
|
||||
this._pagination = new BehaviorSubject<PaginationModel>(defaultPagination);
|
||||
}
|
||||
|
||||
return this._pagination;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user