angular / angular/components

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

Aperta
#12,583 1 commento 6 reazioni 0 assegnatari Vedi su GitHub
area: material/paginator P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione su StackBlitz e confronta l’assegnazione diretta di pageSize con _changePageSize(). Il lavoro è completato quando la modifica di pageSize ridisegna immediatamente le righe visibili aggiornando il testo degli elementi per pagina, senza richiedere il metodo privato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.