fix table subheader grouping
This commit is contained in:
parent
6bbd6c5df5
commit
96f2e178c9
@ -248,7 +248,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5>Subheader Grouping</h5>
|
<h5>Subheader Grouping</h5>
|
||||||
<p-table [value]="customers3" sortField="representative.name" sortMode="single" (onSort)="onSort()" responsiveLayout="scroll" [scrollable]="true" scrollHeight="600px"
|
<p-table [value]="customers3" rowGroupMode="subheader" groupRowsBy="representative.name" sortField="representative.name" sortMode="single" (onSort)="onSort()" responsiveLayout="scroll" [scrollable]="true" scrollHeight="600px"
|
||||||
styleClass="p-datatable-customers">
|
styleClass="p-datatable-customers">
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
@ -260,7 +260,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="body" let-customer let-rowIndex="rowIndex">
|
<ng-template pTemplate="body" let-customer let-rowIndex="rowIndex">
|
||||||
<tr *ngIf="rowGroupMetadata[customer.representative.name].index === rowIndex">
|
<tr pRowGroupHeader *ngIf="rowGroupMetadata[customer.representative.name].index === rowIndex">
|
||||||
<td colspan="5" style="min-width: 200px;">
|
<td colspan="5" style="min-width: 200px;">
|
||||||
<img [alt]="customer.representative.name" src="assets/demo/images/avatar/{{customer.representative.image}}" width="32" style="vertical-align: middle" />
|
<img [alt]="customer.representative.name" src="assets/demo/images/avatar/{{customer.representative.image}}" width="32" style="vertical-align: middle" />
|
||||||
<span class="p-text-bold ml-2">{{customer.representative.name}}</span>
|
<span class="p-text-bold ml-2">{{customer.representative.name}}</span>
|
||||||
|
@ -161,10 +161,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .p-datatable .p-column-filter {
|
|
||||||
// display: none;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.table-header {
|
.table-header {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user