[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
This commit is contained in:
Vito
2018-04-18 11:16:03 +01:00
committed by Eugenio Romano
parent 026da57cb8
commit e3ff312d04

View File

@@ -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;
if (this.taskListPagination) {
this.taskPage = this.taskListPagination.current - 1;
if (this.taskList) {
this.taskList.reload();
} else {
this.navigateToProcess();
}
if (this.processList) {
this.processList.reload();
if (!this.taskList) {
this.navigateToProcess();
}
}