diff --git a/ng2-components/ng2-activiti-tasklist/README.md b/ng2-components/ng2-activiti-tasklist/README.md
index 88acdfa69e..d3cd4709d0 100644
--- a/ng2-components/ng2-activiti-tasklist/README.md
+++ b/ng2-components/ng2-activiti-tasklist/README.md
@@ -124,6 +124,8 @@ You can also use HTML-based schema declaration like shown below:
| page | number | 0 | The page of the tasks to fetch. |
| size | number | 5 | The number of tasks to fetch. |
| assignment | string || The assignment of the process.
Possible values are: - assignee : where the current user is the assignee
- candidate: where the current user is a task candidate
- group_x: where the task is assigned to a group where the current user is a member of.
- no value: where the current user is involved
|
+| selectionMode | string | 'single' | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
+| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
| state | string || Define state of the processes. Possible values are: `completed`, `active` |
| hasIcon | boolean | true | Toggle the icon on the left . |
| landingTaskId | string | | Define which task id should be selected after the reloading. If the task id doesn't exist or nothing is passed it will select the first task |
@@ -136,6 +138,7 @@ You can also use HTML-based schema declaration like shown below:
| --- | --- |
| onSuccess | Raised when the task list is loaded |
| rowClick | Raised when the task in the list is clicked |
+| rowsSelected | Raised when the a row is selected/unselected |
### Details
diff --git a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.html b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.html
index f010b72aa7..488d565039 100644
--- a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.html
+++ b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.html
@@ -4,6 +4,10 @@
diff --git a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts
index 8b3a3b8f4a..e064f77d3b 100644
--- a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts
+++ b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts
@@ -62,9 +62,18 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
@Input()
data: DataTableAdapter;
+ @Input()
+ selectionMode: string = 'none'; // none|single|multiple
+
+ @Input()
+ multiselect: boolean = false;
+
@Output()
rowClick: EventEmitter = new EventEmitter();
+ @Output()
+ rowsSelected: EventEmitter = new EventEmitter();
+
@Output()
onSuccess: EventEmitter = new EventEmitter();
@@ -72,6 +81,7 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
onError: EventEmitter = new EventEmitter();
currentInstanceId: string;
+ selectedInstances: any[];
@Input()
page: number = 0;
@@ -265,11 +275,21 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
* @param event
*/
onRowClick(event: DataRowEvent) {
- let item = event;
+ const item = event;
this.currentInstanceId = item.value.getValue('id');
this.rowClick.emit(this.currentInstanceId);
}
+ onRowSelect(event: CustomEvent) {
+ this.selectedInstances = [...event.detail.selection];
+ this.rowsSelected.emit(this.selectedInstances);
+ }
+
+ onRowUnselect(event: CustomEvent) {
+ this.selectedInstances = [...event.detail.selection];
+ this.rowsSelected.emit(this.selectedInstances);
+ }
+
/**
* Optimize name field
* @param istances