Shows a list of users (people).
Populate the users in the component class:
import { UserProcessModel } from '@alfresco/adf-core'; class SomeComponent implements OnInit { people: UserProcessModel[] = [ { id: 1, email: '[email protected]', firstName: 'John', lastName: 'Doe' }, { id: 2, email: '[email protected]', firstName: 'Jane', lastName: 'Doe' } ]; onClickPeopleRow(user: UserProcessModel) { console.log('Clicked row: ', user); } onClickPeopleAction($event: Event) { console.log('Clicked action: ', $event); }
You can use column templates with the people list component, since it is based on the Datatable component:
<adf-people-list
[users]="people"
[actions]="true"
(clickRow)="onClickPeopleRow($event)"
(clickAction)="onClickPeopleAction($event)">
<data-columns>
<data-column key="firstName" class="people-pic">
<ng-template let-entry="$implicit">
{{entry.row.obj.firstName + ' ' + entry.row.obj.lastName}}
</ng-template>
</data-column>
<data-column key="email" class="full-width">
<ng-template let-entry="$implicit">
<div class="adf-people-email">{{ entry.row.obj.email }}</div>
</ng-template>
</data-column>
</data-columns>
</adf-people-list>
Name | Type | Default value | Description |
---|---|---|---|
actions | boolean | false | Toggles whether or not actions should be visible, i.e. the 'Three-Dots' menu. |
users | UserProcessModel [] | The array of user data used to populate the people list. |
Name | Type | Description |
---|---|---|
clickAction | EventEmitter < UserEventModel > | Emitted when the user clicks in the 'Three Dots' drop down menu for a row. |
clickRow | EventEmitter < UserProcessModel > | Emitted when the user clicks a row in the people list. |
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.