gregnb / gregnb/mui-datatables

How can I enable pagination for an unknown number of rows?

Open
#1,196 7 comments 4 reactions 0 assignees View on GitHub
needs verification
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

I'm trying to implement server-side pagination but the server doesn't return the total number of items.
In the [MaterialUI TablePagination component docs](https://material-ui.com/api/table-pagination/#props) it says that `count` prop should be `-1` to enable pagination, I tried to set `options.count` to `-1` as it's passed down to the `MuiTablePagination` component but the pagination buttons are disabled.
Is there a way I can enable pagination for an unknown number of items?

## Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | 4.7.1 |
| MUI-datatables | 2.12.4 |
| React | 16.12.0 |

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how options.count is passed to the MuiTablePagination component, then compare the behavior with the Material-UI TablePagination documentation for count=-1. Verify the pagination controls with a server-side data source whose total item count is unknown; done means the controls remain usable and allow navigation through available pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.