mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-07 18:25:09 +00:00
[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:
parent
0a748ac555
commit
caab70e021
@ -108,16 +108,19 @@ adf-process-instance-list also supports pagination and the same can be used as s
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Description | | |
|
| Name | Type | Default | Description |
|
||||||
| ---- | ----------- | --- | --- |
|
| ---- | ----------- | --- | --- |
|
||||||
| appId | The id of the app. | | |
|
| appId | number | | The id of the app. |
|
||||||
| processDefinitionKey | The processDefinitionKey of the process. | | |
|
| processDefinitionKey | string | | The processDefinitionKey of the process. |
|
||||||
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
|
| presetColumn | string | | The presetColumn of the custom schema to fetch. |
|
||||||
| state | Define state of the processes. Possible values are `running`, `completed` and `all` | | |
|
| state | string | | 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` | | |
|
| sort | string | | 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. |
|
| name | string | | The name of the list. |
|
||||||
| size | number | 25 | The number of tasks to fetch. |
|
| page | number | 0 | The page of the processes to fetch. |
|
||||||
| schemaColumn | List of columns to display in the process instances datatable (see the [Details](#details) section below) | | |
|
| 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
|
### 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 |
|
| 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 |
|
| 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
|
## See also
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
<adf-datatable
|
<adf-datatable
|
||||||
[data]="data"
|
[data]="data"
|
||||||
[loading]="isLoading"
|
[loading]="isLoading"
|
||||||
|
[selectionMode]="selectionMode"
|
||||||
|
[multiselect]="multiselect"
|
||||||
(rowClick)="onRowClick($event)"
|
(rowClick)="onRowClick($event)"
|
||||||
(row-keyup)="onRowKeyUp($event)">
|
(row-keyup)="onRowKeyUp($event)">
|
||||||
<loading-content-template>
|
<loading-content-template>
|
||||||
|
@ -81,22 +81,33 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
@Input()
|
@Input()
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
/** The presetColumn of the custom schema to fetch. */
|
/* The page number of the processes to fetch. */
|
||||||
@Input()
|
@Input()
|
||||||
page: number = 0;
|
page: number = 0;
|
||||||
|
|
||||||
|
/* The page number processes to fetch. */
|
||||||
@Input()
|
@Input()
|
||||||
size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems;
|
size: number = PaginationComponent.DEFAULT_PAGINATION.maxItems;
|
||||||
|
|
||||||
|
/** The presetColumn of the custom schema to fetch. */
|
||||||
@Input()
|
@Input()
|
||||||
presetColumn: string;
|
presetColumn: string;
|
||||||
|
|
||||||
requestNode: ProcessFilterParamRepresentationModel;
|
|
||||||
|
|
||||||
/** Data source to define the datatable. */
|
/** Data source to define the datatable. */
|
||||||
@Input()
|
@Input()
|
||||||
data: DataTableAdapter;
|
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. */
|
/** Emitted when a row in the process list is clicked. */
|
||||||
@Output()
|
@Output()
|
||||||
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
||||||
@ -109,6 +120,7 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
@Output()
|
@Output()
|
||||||
error: EventEmitter<any> = new EventEmitter<any>();
|
error: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
requestNode: ProcessFilterParamRepresentationModel;
|
||||||
currentInstanceId: string;
|
currentInstanceId: string;
|
||||||
isLoading: boolean = true;
|
isLoading: boolean = true;
|
||||||
layoutPresets = {};
|
layoutPresets = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user