就像我们有ngx-datatable-group-header一样,我们没有ngx-datatable-group-footer。但是,如果我们想在组级中显示页脚中的内容,我们可以做什么?就像我要求在每个组的页脚中显示组级别中的行数但由于没有ngx-datatable-group-footer而无法执行此操作。我能够实现的当前功能是显示总行数(不是单个组级别)。任何人的想法?
以下是我的代码段:
<ngx-datatable #table
class='datatable'
[sortType]="'single'"
[columns]="columns"
[columnMode]="'flex'"
[headerHeight]="40"
[footerHeight]="50"
[rowHeight]="'auto'"
[groupRowsBy]="'isCurrentDate'"
[limit]="10"
[rows]='rows'
[groupExpansionDefault]="true"
[scrollbarH]="true">
<ngx-datatable-group-header [rowHeight]="60" #myGroupHeader>
<ng-template let-group="group" let-expanded="expanded" ngx-datatable-group-header-template>
<div style="padding-left:5px;">
<a title="Expand/Collapse Group"
(click)="toggleExpandGroup(group)">
<b>{{group.value[0].isCurrentDate === true? 'Scheduled for Today':'Scheduled for other days'}}</b>
</a>
</div>
</ng-template>
</ngx-datatable-group-header>
<ngx-datatable-footer>
<ng-template ngx-datatable-footer-template
let-rowCount="rowCount">
<div style="padding: 5px 10px">
<div>
{{rowCount}} total
</div>
</div>
</ng-template>
</ngx-datatable-footer>
</ngx-datatable>