【问题标题】:how to get the current [pageSizeOptions] into component on click of other Button(not Pagination buttons)如何在单击其他按钮(不是分页按钮)时将当前 [pageSizeOptions] 放入组件
【发布时间】:2020-05-23 20:52:06
【问题描述】:

我有一个场景,我想获取当前的 pageSizeOptions 像 20 来显示数据 where [pageSizeOptions] = {10,20,30,40,50};

用户已经将 pageSizeOption 选择为 20,当他点击其他按钮(分页除外)时,pageSigeOption 显示 20,但我只得到 10 条记录。这是因为每当我点击按钮时。 我正在调用 paginate 方法,页面事件为 0,pageSize 为 10,并在我的 Paginate 方法中使用它。

我想将 pageSize 事件设置为在 pageSizeOption 中选择的任何内容,例如 20,当我在另一个按钮上选择时,将相同的 pageSize 传递给 Paginate 方法(无需单击 Pagination 项)。

【问题讨论】:

  • 请堆叠闪电战

标签: angular angular-material angular6 angular5 angular7


【解决方案1】:

问题通过在代码中使用得到解决。 this.paginator.pageSize

【讨论】:

    猜你喜欢
    • 2015-06-20
    • 2012-06-02
    • 2019-11-17
    • 1970-01-01
    • 1970-01-01
    • 2015-03-28
    • 2022-11-30
    • 2018-04-11
    • 1970-01-01
    相关资源
    最近更新 更多