Documentation

Data Table

Pagination

Numbered pages, a rows-per-page select and a "Showing 21–30 of 380" range, all built from pageInfo.

Preview

Email
1Ada Lovelaceada.lovelace@vitnode.com
2Alan Ritchiealan.ritchie@vitnode.com
3Grace Lamarrgrace.lamarr@vitnode.com
4Linus Torvaldslinus.torvalds@vitnode.com
5Margaret Liskovmargaret.liskov@vitnode.com
6Dennis Turingdennis.turing@vitnode.com
7Katherine Johnsonkatherine.johnson@vitnode.com
8Ken Berners-Leeken.berners-lee@vitnode.com
9Barbara Hamiltonbarbara.hamilton@vitnode.com
10Guido van Rossumguido.vanrossum@vitnode.com

Showing 1–10 of 36

Usage

There's nothing to wire up. Pass pageInfo from the API and the table renders numbered pages, a rows-per-page select (10, 20, 30 or 40) and a "Showing 21–30 of 380" range.

  • Pages are real links. ?page=3 works with middle-click and "open in new tab", while a plain click stays client-side.
  • Phones get a label. Below sm, the numbers collapse to "Page 3 of 38" between the arrows.
  • Filters and page size reset to page one. The old page no longer means what it did.
  • Too far lands on the last page. The API clamps a page past the end, so stale links still show rows.

The API does the counting. See Pagination for the route side, including the index your sorted column needs.

On this page