Documentation
Pagination
Pagination helps manage large datasets by dividing the table data into manageable pages. This improves performance, reduces visual clutter, and provides a better user experience for navigating through extensive data collections.
Basic Pagination
To enable pagination in Simple Table, you need to add the shouldPaginate prop to your SimpleTable component. This will automatically handle pagination of your data.
Pagination Configuration
Pagination Features
When pagination is enabled, Simple Table provides:
- Automatic page navigation controls
- Page size selection
- Current page indicator
- Total pages display
Server-Side Pagination
For large datasets, you can implement server-side pagination where data is fetched from the server one page at a time. This improves performance by only loading the data needed for the current page.
To enable server-side pagination, use these props:
serverSidePagination={true}- Disables internal pagination slicingtotalRowCount={number}- Total rows available on the serveronPageChange=(page) => {...}- Callback to fetch data for the new page
Pro Tip
When using server-side pagination, make sure to update your rows prop with the new page data inside your onPageChange callback. The table will display whatever data you provide in the rows prop.
💡 Loading States with Pagination
Combine pagination with the isLoading prop to show skeleton loaders while fetching new page data. This provides better user feedback during page transitions. See the Loading State documentation for more details.
Overflow Behavior
When pagination is enabled without a specified height, the table will automatically adjust to show all rows on the current page with visible overflow (no internal scrolling). This provides a cleaner user experience for paginated data.
Customizing the Footer
While Simple Table provides a default pagination footer, you can completely customize its appearance and functionality using the footerRenderer prop. This allows you to:
- Match your application's design system
- Add custom pagination controls and navigation
- Display summary statistics or totals
- Include action buttons or additional functionality
💡 Advanced Customization
Learn how to create custom pagination footers with complete control over appearance and behavior. Visit the Footer Renderer documentation for detailed examples and API reference.