angular / angular/components

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

Offen
#9,013 10 Kommentare 12 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: material/paginator feature P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.