Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable should show pagination when using lazy loading strategies. #7154

Open
alex-pomata-hpe opened this issue Mar 5, 2024 · 0 comments
Labels
DataTable DataTable related issues

Comments

@alex-pomata-hpe
Copy link

Currently if you return a data array with a length less than the step the pagination is hidden. This doesn't let you fetch one page worth of data and lazy fetch the rest.

Expected Behavior

It should be able to take the total number of items to manage the pagination properly
(currently you can pass that down in the pagination property which makes the pagination show the correct number of pages but the Data Table will hide the pagination unless you add additional fake data to have an array greater than the step)

Steps to Reproduce

Create a DataTable with an array smaller than the step value. Add an onChange to pagination to allow for lazy fetching more data add numberItems to give it the larger total. See that the pagination getts hidden. Add one additional data point over the step size to see the whole pagination show and work again.

Your Environment

  • Grommet version: "grommet": "^2.34.2",
  • Browser Name and version: Chrome 120.0.6099.234
  • Operating System and version (desktop or mobile): mac big sur 11.5.2
@jcfilben jcfilben added the DataTable DataTable related issues label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataTable DataTable related issues
Projects
None yet
Development

No branches or pull requests

2 participants