BumblebeeBumblebee

Paginated table

Live demo

PaginatedTable

I am a banner
Customers table
Registered business nameAccount ID
Contact Email
Business display name
Telephone number
Country
Postal code
Actions
Gleason Group76401242Llewellyn.Aufderhar@gmail.comWelch, Towne and Wintheiser McCullough - Hansen907-661-5282South Africa11574
Nienow - Hyatt74764545Kaitlyn.Tremblay@hotmail.comThiel, Mraz and Hessel Kuhic - Feeney873.824.1433 x17572Norway88404-1733
Rau - Wintheiser74191071Eli.Jenkins@hotmail.comBatz, Hirthe and Feeney Nitzsche - Pagac1-311-762-6713Romania05223
Reichert, Turner and Adams10005842Zackary_MacGyver@gmail.comFeil - Kris Kutch and Sons(736) 906-0573 x123Algeria28215-9972
Doyle Inc11699785Leslie_Roberts@hotmail.comBaumbach, Schumm and Zboncak Schmitt - Lebsack532.221.5730Afghanistan54340
Swaniawski - Ortiz74556833Casper.Daniel@gmail.comBlock LLC D'Amore LLC689.648.6880Bhutan54529
Hartmann, Pollich and Raynor36156241Giles.Abshire42@gmail.comRutherford LLC Rutherford, Gorczany and Carter1-759-812-0667Virgin Islands, British98133
Hintz, Jerde and Stroman27111291Madeline.Will20@gmail.comCummings, Steuber and Lakin Schroeder Inc642-289-8585Jordan16722
O'Hara - Huel95613545Morris18@yahoo.comRitchie Group Russel, Rolfson and Cruickshank269-663-6122 x5725Peru00652-5444
Lueilwitz Inc06938096Katheryn20@gmail.comBergstrom and Sons Williamson - Erdman1-208-975-9706 x328Tuvalu06068

Viewing {total,select,0{{current} of {total}}1{{current} of {total}}other{1-{current} of {total}}}

PaginatedTable with 2 pinned columns

I am a banner
Customers table
Registered business nameAccount IDContact Email
Business display name
Telephone number
Country
Postal code
Actions
Gleason Group76401242Llewellyn.Aufderhar@gmail.comWelch, Towne and Wintheiser McCullough - Hansen907-661-5282South Africa11574
Nienow - Hyatt74764545Kaitlyn.Tremblay@hotmail.comThiel, Mraz and Hessel Kuhic - Feeney873.824.1433 x17572Norway88404-1733
Rau - Wintheiser74191071Eli.Jenkins@hotmail.comBatz, Hirthe and Feeney Nitzsche - Pagac1-311-762-6713Romania05223
Reichert, Turner and Adams10005842Zackary_MacGyver@gmail.comFeil - Kris Kutch and Sons(736) 906-0573 x123Algeria28215-9972
Doyle Inc11699785Leslie_Roberts@hotmail.comBaumbach, Schumm and Zboncak Schmitt - Lebsack532.221.5730Afghanistan54340
Swaniawski - Ortiz74556833Casper.Daniel@gmail.comBlock LLC D'Amore LLC689.648.6880Bhutan54529
Hartmann, Pollich and Raynor36156241Giles.Abshire42@gmail.comRutherford LLC Rutherford, Gorczany and Carter1-759-812-0667Virgin Islands, British98133
Hintz, Jerde and Stroman27111291Madeline.Will20@gmail.comCummings, Steuber and Lakin Schroeder Inc642-289-8585Jordan16722
O'Hara - Huel95613545Morris18@yahoo.comRitchie Group Russel, Rolfson and Cruickshank269-663-6122 x5725Peru00652-5444
Lueilwitz Inc06938096Katheryn20@gmail.comBergstrom and Sons Williamson - Erdman1-208-975-9706 x328Tuvalu06068

Viewing {total,select,0{{current} of {total}}1{{current} of {total}}other{1-{current} of {total}}}

Code

Paginated Table

import { PaginatedTable } from './paginated-table';

const values = Table.OffsetPagination.paginationToResultValues(
  pagination,
  window.navigator.language,
);

<PaginatedTable
  caption="Table caption"
  rows={rows}
  columns={columns}
  fallbackMessage="Fallback message"
>
  <PaginatedTable.OffsetPagination {...pagination}>
    {values.from} - {values.to} of {values.total}
  </PaginatedTable.OffsetPagination>
</PaginatedTable>;

Paginated table with variant option in the table cells

import{ PaginatedTable } from './paginated-table';

const columns: Columns = [
  {
    headerName: 'Registered business name',
    field: 'companyName',
    cellTextVariant: 'captionMedium150',
  },
  {
    headerName: 'Business display name',
    field: 'displayName',
    cellTextVariant: 'captionMedium150',
  },
  {
    headerName: 'Contact Email',
    field: 'emailAddress',
    cellTextVariant: 'captionMedium150',
  },
];

<PaginatedTable
  caption="Table caption"
  rows={rows}
  columns={columns}
  fallbackMessage="Fallback message"
  banner={
    <PaginatedTable.Banner>
      <Text>I am a banner</Text>
    </PaginatedTable.Banner>
  }
>
  <PaginatedTable.OffsetPagination {...pagination}>
    {values.from} - {values.to} of {values.total}
  </PaginatedTable.OffsetPagination>
</Paginated>