1
|
<p-table [value]="_users?.data"
|
2
|
selectionMode="single"
|
3
|
dataKey="id"
|
4
|
[(selection)]="selectedUser"
|
5
|
[lazy]="true"
|
6
|
[totalRecords]="totalRecords"
|
7
|
(onLazyLoad)="onLazyLoad($event)"
|
8
|
[paginator]="true"
|
9
|
[rows]="rows"
|
10
|
[loading]="load"
|
11
|
styleClass="p-datatable-gridlines"
|
12
|
[rowHover]="true"
|
13
|
(click)="addSelectedUser(selectedUser)"
|
14
|
[autoLayout]="true"
|
15
|
#usersTable>
|
16
|
<ng-template pTemplate="header">
|
17
|
<tr>
|
18
|
<th style="width: 3rem"></th>
|
19
|
<th>User Code</th>
|
20
|
<th>User Name</th>
|
21
|
<th>User Surname</th>
|
22
|
<th>User Email</th>
|
23
|
<th>Status</th>
|
24
|
</tr>
|
25
|
</ng-template>
|
26
|
<ng-template pTemplate="body" let-user>
|
27
|
<tr>
|
28
|
<td>
|
29
|
<p-tableRadioButton [value]="user"></p-tableRadioButton>
|
30
|
</td>
|
31
|
<td>{{user.userCode}}</td>
|
32
|
<td>{{user.name}}</td>
|
33
|
<td>{{user.surname}}</td>
|
34
|
<td>{{user.email}}</td>
|
35
|
<td>{{user.status}}</td>
|
36
|
</tr>
|
37
|
</ng-template>
|
38
|
</p-table>
|