【问题标题】:Primeng paginator rowsPerPageOption support for 'All'Primeng 分页器 rowsPerPageOption 支持“全部”
【发布时间】:2019-05-15 18:04:08
【问题描述】:

我想知道是否有等效的解决方案(在primeng 中)为rowsPerPageOptions 提供“全部”选项。目前解决这个问题的唯一方法是添加一个非常大的数字,但这并不理想\最优:例如。

 <p-table #dataTable
                                 [lazy]="false"
                                 [value]="primengTableHelper.records"
                                 [paginator]="true"
                                 [rows]="rowsPerPage"
                                 [rowsPerPageOptions]="[5,10,25,50,100,100000]"
                                 [scrollable]="true"
                                 ScrollWidth="100%"
                                 [resizableColumns]="true"
                                 (onFilter)="onFilterChange()"
                                 sortMode="multiple" [multiSortMeta]="multiSortMeta">

我尝试添加一个“全部”选项,但它不会触发任何类型的事件以能够以自定义方式处理它(仅触发数值上的事件)。有没有人对我如何在没有完全定制的解决方案(或俗气的大数字来捕获所有记录)的情况下解决这个问题有任何想法。谢谢。

【问题讨论】:

    标签: primeng


    【解决方案1】:

    使用这个配置:

    [rowsPerPageOptions]="[1,20, 50, { showAll: 'All' }]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-07
      • 1970-01-01
      • 1970-01-01
      • 2019-09-06
      • 1970-01-01
      • 2010-12-20
      • 2021-03-01
      • 2017-07-04
      相关资源
      最近更新 更多