[ADF-2394] Process List Component - Should expose the mutiSelect property (#3013)

* [ADF-2394] Exposed multiselect and selectionMode

* [ADF-2394] Improved documentation
This commit is contained in:
Deepak Paul 2018-03-06 15:29:23 +05:30 committed by Eugenio Romano
parent 0a748ac555
commit caab70e021
3 changed files with 29 additions and 23 deletions

View File

@ -108,16 +108,19 @@ adf-process-instance-list also supports pagination and the same can be used as s
### Properties
| Name | Description | | |
| Name | Type | Default | Description |
| ---- | ----------- | --- | --- |
| appId | The id of the app. | | |
| processDefinitionKey | The processDefinitionKey of the process. | | |
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
| state | Define state of the processes. Possible values are `running`, `completed` and `all` | | |
| sort | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` | | |
| page | number | 0 | The page of the tasks to fetch. |
| size | number | 25 | The number of tasks to fetch. |
| schemaColumn | List of columns to display in the process instances datatable (see the [Details](#details) section below) | | |
| appId | number | | The id of the app. |
| processDefinitionKey | string | | The processDefinitionKey of the process. |
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
| state | string | | Define state of the processes. Possible values are `running`, `completed` and `all` |
| sort | string | | Define sort of the processes. Possible values are `created-desc`, `created-asc`, `ended-desc`, `ended-asc` |
| name | string | | The name of the list. |
| page | number | 0 | The page of the processes to fetch. |
| size | number | 25 | The number of processes to fetch. |
| data | DataTableAdapter | | Data source to define the datatable. |
| multiselect | boolean | false | Toggles multiple row selection, renders checkboxes at the beginning of each row. |
| 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. |
### Events
@ -127,17 +130,6 @@ adf-process-instance-list also supports pagination and the same can be used as s
| success | Emitted when the list of process instances has been loaded successfully from the server |
| error | Emitted when an error is encountered loading the list of process instances from the server |
## Details
Example value for the schemaColumn property (see [Properties](#properties) section above):
```json
[
{type: 'text', key: 'id', title: 'Id', sortable: true},
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'started', title: 'Started', sortable: true},
{type: 'text', key: 'startedBy.email', title: 'Started By', sortable: true}
]
```
## See also

View File

@ -3,6 +3,8 @@
<adf-datatable
[data]="data"
[loading]="isLoading"
[selectionMode]="selectionMode"
[multiselect]="multiselect"
(rowClick)="onRowClick($event)"
(row-keyup)="onRowKeyUp($event)">
<loading-content-template>

View File

@ -81,22 +81,33 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
@Input()
name: string;
/** The presetColumn of the custom schema to fetch. */
/* The page number of the processes to fetch. */
@Input()
page: number = 0;
/* The page number processes to fetch. */
@Input()
size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems;
/** The presetColumn of the custom schema to fetch. */
@Input()
presetColumn: string;
requestNode: ProcessFilterParamRepresentationModel;
/** Data source to define the datatable. */
@Input()
data: DataTableAdapter;
/* Toggles multiple row selection, renders checkboxes at the beginning of each row */
@Input()
multiselect: boolean = false;
/* 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.
*/
@Input()
selectionMode: string = 'single'; // none|single|multiple
/** Emitted when a row in the process list is clicked. */
@Output()
rowClick: EventEmitter<string> = new EventEmitter<string>();
@ -109,6 +120,7 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
requestNode: ProcessFilterParamRepresentationModel;
currentInstanceId: string;
isLoading: boolean = true;
layoutPresets = {};