From 1108e2e77a657c898dcaeb4c121a358434ece13c Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 18 Jul 2019 13:02:45 +0100 Subject: [PATCH] fix regression pagiantion document list --- .../components/document-list.component.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/content-services/document-list/components/document-list.component.ts b/lib/content-services/document-list/components/document-list.component.ts index 2dc54c8b5c..45d2a53dd7 100644 --- a/lib/content-services/document-list/components/document-list.component.ts +++ b/lib/content-services/document-list/components/document-list.component.ts @@ -328,6 +328,12 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte private thumbnailService: ThumbnailService, private alfrescoApiService: AlfrescoApiService, private lockService: LockService) { + this.userPreferencesService + .select(UserPreferenceValues.PaginationSize) + .pipe(takeUntil(this.onDestroy$)) + .subscribe(pagSize => { + this.maxItems = this._pagination.maxItems = pagSize; + }); } getContextActions(node: NodeEntry) { @@ -372,13 +378,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte } ngOnInit() { - this.userPreferencesService - .select(UserPreferenceValues.PaginationSize) - .pipe(takeUntil(this.onDestroy$)) - .subscribe(pagSize => { - this.maxItems = this._pagination.maxItems = pagSize; - }); - this.rowMenuCache = {}; this.loadLayoutPresets(); this.data = new ShareDataTableAdapter(this.thumbnailService, this.contentService, null, this.getDefaultSorting(), this.sortingMode);