From f58405e07a52ddc603c9b7ae6201dd7af162fe42 Mon Sep 17 00:00:00 2001 From: madhukar23 <30654750+madhukar23@users.noreply.github.com> Date: Fri, 5 Jan 2018 17:53:40 +0530 Subject: [PATCH] [ADF-2119] Document List - The pagination should be fetched from the UserPreference (#2801) * Changed the service fetching page sizes in document-list component * uncommented a line in process-service.component.ts for the tasklist to show page-sizes in task-list --- .../app/components/process-service/process-service.component.ts | 2 +- .../document-list/components/document-list.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-shell/src/app/components/process-service/process-service.component.ts b/demo-shell/src/app/components/process-service/process-service.component.ts index fc4ff1d0c5..0456dab069 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.ts +++ b/demo-shell/src/app/components/process-service/process-service.component.ts @@ -153,7 +153,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit private preferenceService: UserPreferencesService) { this.dataTasks = new ObjectDataTableAdapter(); this.dataTasks.setSorting(new DataSorting('created', 'desc')); - // this.supportedPages = this.preferenceService.getDifferentPageSizes(); + this.supportedPages = this.preferenceService.getDifferentPageSizes(); this.taskPagination.maxItems = this.preferenceService.paginationSize; // Uncomment this line to replace all 'text' field editors with custom component 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 f01d57a7a6..a80a9b811a 100644 --- a/lib/content-services/document-list/components/document-list.component.ts +++ b/lib/content-services/document-list/components/document-list.component.ts @@ -874,7 +874,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte } get supportedPageSizes(): number[] { - return this.appConfig.get('document-list.supportedPageSizes', [5, 10, 15, 25]); + return this.preferences.getDifferentPageSizes(); } ngOnDestroy() {