From e3ff312d0484945b9814fffc9661baba95f2f74a Mon Sep 17 00:00:00 2001 From: Vito Date: Wed, 18 Apr 2018 11:16:03 +0100 Subject: [PATCH] [ADF-2692] - refresh must be done on tab changes otherwise ViewChild obj refrence are null (#3190) * [ADF-2692] - refresh must be done on tab changes otherwise ViewChild obj refrence are null * [ADF-2692] removed extra reloading calls * [ADF-2692] rebased and fixed name --- .../process-service.component.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 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 e3620f1184..4e0f362684 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 @@ -243,6 +243,12 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit onTabChange(event: any): void { this.showProcessPagination = event.index === 1; this.paginationPageSize = this.preferenceService.paginationSize; + if (this.processList) { + this.processList.reload(); + } + if (this.taskList) { + this.taskList.reload(); + } } onChangePageSize(event: Pagination): void { @@ -367,14 +373,11 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit onFormCompleted(form): void { this.currentTaskId = null; - this.taskPage = this.taskListPagination.current - 1; - if (this.taskList) { - this.taskList.reload(); - } else { - this.navigateToProcess(); + if (this.taskListPagination) { + this.taskPage = this.taskListPagination.current - 1; } - if (this.processList) { - this.processList.reload(); + if (!this.taskList) { + this.navigateToProcess(); } }