[Paginator] Does not update correctly when `pageSize` updated programatically
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
When changing the `pageSize` attribute on a pager instance, the pager should immediately redraw the visible rows to match the new setting.
#### What is the current behavior?
The description text ("Items per page: 10") is updated, however the old number of rows still appear.
#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-pvrjd5
#### What is the use-case or motivation for changing an existing behavior?
Dynamically changing the number of rows (e.g. on page resize)
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.6, Material 6.4.1
#### Is there anything else we should know?
Calling `_changePageSize()` instead of changing the property works as expected.
贡献指南
调研方向
从 StackBlitz 复现开始,并比较直接赋值 pageSize 与 _changePageSize()。完成的标准是:更改 pageSize 会立即重绘可见行,同时更新每页项目数文本,而无需调用私有方法。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100