fix regression pagiantion document list

This commit is contained in:
Eugenio Romano 2019-07-18 13:02:45 +01:00
parent a0d4160c11
commit 1108e2e77a

View File

@ -328,6 +328,12 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
private thumbnailService: ThumbnailService, private thumbnailService: ThumbnailService,
private alfrescoApiService: AlfrescoApiService, private alfrescoApiService: AlfrescoApiService,
private lockService: LockService) { private lockService: LockService) {
this.userPreferencesService
.select(UserPreferenceValues.PaginationSize)
.pipe(takeUntil(this.onDestroy$))
.subscribe(pagSize => {
this.maxItems = this._pagination.maxItems = pagSize;
});
} }
getContextActions(node: NodeEntry) { getContextActions(node: NodeEntry) {
@ -372,13 +378,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
} }
ngOnInit() { ngOnInit() {
this.userPreferencesService
.select(UserPreferenceValues.PaginationSize)
.pipe(takeUntil(this.onDestroy$))
.subscribe(pagSize => {
this.maxItems = this._pagination.maxItems = pagSize;
});
this.rowMenuCache = {}; this.rowMenuCache = {};
this.loadLayoutPresets(); this.loadLayoutPresets();
this.data = new ShareDataTableAdapter(this.thumbnailService, this.contentService, null, this.getDefaultSorting(), this.sortingMode); this.data = new ShareDataTableAdapter(this.thumbnailService, this.contentService, null, this.getDefaultSorting(), this.sortingMode);