angular / angular/components

[Paginator] Does not update correctly when `pageSize` updated programatically

オープン
#12,583 コメント 1 件 リアクション 6 件 担当者 0 名 GitHub で見る
area: material/paginator P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
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 を変更すると、private メソッドを必要とせずに表示中の行が直ちに再描画され、1 ページあたりの項目数のテキストが更新されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。