angular / angular/components

[Paginator] Ability to manually update hasNextPage() return value

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

Descrizione

#### Bug, feature request, or proposal:

Feature request

#### What is the expected behavior?

Return value of hasNextPage() (or hasPreviousPage()) method can be updated manually by a property outside of pageSize and pageIndex.

#### What is the current behavior?

Calculates return value based on pageSize and pageIndex

#### What is the use-case or motivation for changing an existing behavior?

In the event when the pageSize/length passed is not an accurate representation of the true length but an estimated length (when data is sent via the server). In this case, useful to be able to determine hasNextPage() method based on whether or not the server determines a next page exists. Otherwise, paginator will either allow nextPage events to fire when an empty query is returned or disallow pagination when more data can be queried.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the paginator's hasNextPage() and hasPreviousPage() entry points and trace how pageSize and pageIndex determine their results. Review the issue's server-side estimated-length use case and the existing comment discussion; done means the API and behavior clearly support server-provided page-boundary information without breaking current pagination behavior.

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

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 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.