[Paginator] Does not update correctly when `pageSize` updated programatically
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### 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.
Beitragsleitfaden
Rechercherichtung
Beginne mit der StackBlitz-Reproduktion und vergleiche die direkte Zuweisung von pageSize mit _changePageSize(). Als erledigt gilt die Änderung, wenn das Ändern von pageSize die sichtbaren Zeilen sofort neu zeichnet und dabei den Text für die Elemente pro Seite aktualisiert, ohne die private Methode zu benötigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100