mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
dc64231ba5
commit
244d1aae85
@@ -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;
|
||||
@@ -129,7 +117,7 @@ export class TaskListDemoComponent implements OnInit {
|
||||
if (this.isFormValid()) {
|
||||
this.filterTasks(taskFilter);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
filterTasks(taskFilter: any) {
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user