-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Steps to reproduce
Steps:
- Open this link to live example: https://stackblitz.com/edit/1yfh2vxy?file=src%2FDemo.tsx
- Click the populate rows button
- See that the rows that are displayed go beyond the page size:
Current behavior
Hello 👋 I'm seeing an issue where if a DataGridPro is initially rendered with no rows and I conditionally turn off pagination for no rows, then when I populate the rows, for some reason the pagination turns on, but doesn't function properly. See in the gif how all 11 rows are still displayed even though the pagination says only 5 should be displayed.
Expected behavior
I would expect to be able to change the pagination
prop to true and the pagination to both turn on and function properly to only show the amount of rows the page size specifies.
Context
This is happening because our rows are delayed loading in so at first there's no rows and pagination is off, but then we want to turn pagination on when there are rows.
Any help would be appreciated! Thank you!
Your environment
See code sandbox on latest dependencies: https://stackblitz.com/edit/1yfh2vxy?file=src%2FDemo.tsx
Search keywords: pagination, row, no rows, row count
Order ID: 82849