【发布时间】:2019-10-25 14:41:21
【问题描述】:
在我的paginator 中显示自定义页面信息,例如Show {{startItem}} - {{endItem}} of {{totalRecords}} 我发现我需要在我的 PrimeNG 表中使用 currentPageReportTemplate 和一个单独的 paginator。问题是我无法让它与我的桌子通信。
我的代码:
<p-table #dt [columns]="cols" [value]="ciConfig" [resizableColumns]="true" columnResizeMode="expand"
[scrollable]="true" [(selection)]="mySelection" selectionMode="multiple" exportFilename="MessagesConfig"
[showCurrentPageReport]="true">
...
</p-table>
<p-paginator [rows]="10" [rowsPerPageOptions]="[5,10,20,50,100]"
currentPageReportTemplate="Show {{startItem}} - {{endItem}} of {{totalRecords}}"
(onPageChange)="paginate($event)>
</p-paginator>
可能我需要添加分页器的dropdownAppendTo 属性,但仍然找不到使其工作的方法。有什么想法吗?
【问题讨论】:
-
我认为你错过了 [paginator]="false" 属性
-
改了,还是没有。 @SoumyaGangamwar