mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +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> {
|
get pagination(): BehaviorSubject<PaginationModel> {
|
||||||
let maxItems = this.preferences.paginationSize;
|
|
||||||
|
|
||||||
if (!this._pagination) {
|
if (!this._pagination) {
|
||||||
if (this.maxItems) {
|
let maxItems = this.maxItems || this.preferences.paginationSize;
|
||||||
maxItems = this.maxItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
let defaultPagination = <PaginationModel> {
|
let defaultPagination = <PaginationModel> {
|
||||||
maxItems: maxItems,
|
maxItems: maxItems,
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
totalItems: 0,
|
totalItems: 0,
|
||||||
hasMoreItems: false
|
hasMoreItems: false
|
||||||
};
|
};
|
||||||
|
|
||||||
this._pagination = new BehaviorSubject<PaginationModel>(defaultPagination);
|
this._pagination = new BehaviorSubject<PaginationModel>(defaultPagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._pagination;
|
return this._pagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user