alfresco-ng2-components/docs/people.component.md
Andy Stark 900fd70d63 [ADF-1769] Added prop tables and fixed script (#2896)
* [ADF-1769] Added prop tables and fixed script

* [ADF-1769] Corrected JSDoc formatting errors

* [ADF-1769] Restored default column to prop tables
2018-01-31 09:22:05 +00:00

3.2 KiB

People Component

Displays users involved with a specified task

Contents

Basic Usage

<adf-people 
    [people]="YOUR_INVOLVED_PEOPLE_LIST" 
    [taskId]="YOUR_TASK_ID"
    [readOnly]="YOUR_READ_ONLY_FLAG">
</adf-people>

activiti-people

Properties

Name Type Default value Description
people any[] [] The array of User objects to display.
taskId string '' The numeric ID of the task.
readOnly boolean false Should the data be read-only?

Details

How to customize the people component behavior

The people component provide two methods to customize the behavior:

  • involveUserAndCloseSearch: The selected user is going to be added and the search section closed
  • involveUserWithoutCloseSearch: The selected user is going to be added without close the search section

In this way will be easy customize the people component to involve the user with the single or double click event:

<adf-people #people
    (row-click)="people.involveUserAndCloseSearch()"
    [people]="YOUR_INVOLVED_PEOPLE_LIST"
    [taskId]="YOUR_TASK_ID"
    [readOnly]="YOUR_READ_ONLY_FLAG">
</adf-people>

involve-people-single-click-and-close-search

<adf-people #people
    (row-click)="people.involveUserWithoutCloseSearch()"
    [people]="YOUR_INVOLVED_PEOPLE_LIST"
    [taskId]="YOUR_TASK_ID"
    [readOnly]="YOUR_READ_ONLY_FLAG">
</adf-people>

involve-people-single-click-without-close-search

<adf-people #people
    (row-dblclick)="people.involveUserAndCloseSearch()"
    [people]="YOUR_INVOLVED_PEOPLE_LIST"
    [taskId]="YOUR_TASK_ID"
    [readOnly]="YOUR_READ_ONLY_FLAG">
</adf-people>

involve-people-double-click-and-close-search

<adf-people #people
    (row-dblclick)="people.involveUserWithoutCloseSearch()"
    [people]="YOUR_INVOLVED_PEOPLE_LIST"
    [taskId]="YOUR_TASK_ID"
    [readOnly]="YOUR_READ_ONLY_FLAG">
</adf-people>

involve-people-double-click-without-close-search