[ADF-3438] Bugs in Task List Demo Component fixed (#3809)

* [ADF-3438] Bugs in Task List Demo Component fixed

* [ADF-3438] Added default size value for pagination
This commit is contained in:
davidcanonieto
2018-09-20 14:02:15 +01:00
committed by Eugenio Romano
parent dc64231ba5
commit 244d1aae85

View File

@@ -26,37 +26,25 @@ import { debounceTime } from 'rxjs/operators';
})
export class TaskListDemoComponent implements OnInit {
defaultAppId: number;
DEFAULT_SIZE = 20;
taskListForm: FormGroup;
errorMessage: string;
appId: number;
defaultAppId: number;
id: string;
processDefinitionId: string;
processInstanceId: string;
state: string;
assignment: string;
name: string;
sort: string;
start: number;
size: number;
page: number;
size: number = this.DEFAULT_SIZE;
page: number = 0;
dueAfter: string;
dueBefore: string;
includeProcessInstance: boolean;
@@ -142,8 +130,13 @@ export class TaskListDemoComponent implements OnInit {
this.state = taskFilter.taskState;
this.sort = taskFilter.taskSort;
this.start = taskFilter.taskStart;
this.size = taskFilter.taskSize;
this.page = taskFilter.taskPage;
this.size = +taskFilter.taskSize;
if (taskFilter.page > 0) {
this.page = +taskFilter.taskPage - 1;
} else {
this.page = +taskFilter.taskPage;
}
this.dueAfter = taskFilter.taskDueAfter;
this.dueBefore = taskFilter.taskDueBefore;
@@ -165,7 +158,7 @@ export class TaskListDemoComponent implements OnInit {
this.state = null;
this.sort = null;
this.start = null;
this.size = null;
this.size = this.DEFAULT_SIZE;
this.page = null;
this.dueAfter = null;
this.dueBefore = null;