-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Delayed rows replaced with lazy loading, can't remove loading skeleton rows #12769
Comments
@MBilalShafi could you please have a look into this? |
Hey @kavitang, The skeleton rows are being shown after setting the If your grid has 3 rows as you say in I tried to do that in the linked example, here's the updated example: https://stackblitz.com/edit/react-uavfyx-hyuabr?file=Demo.tsx Sidenote: If you don't require to lazy load rows on scroll down, you can skip using the lazy loading ( Does it make sense? |
Thanks @MBilalShafi - but the flow of events in my app is
Row count is being updated correctly on both occasions, but the lazy loading rows don't disappear after setting rowcount to 3 from 9. In your fork the updated data is the same length as before, since you changed the delayed As for lazy loading prop, the app does not know if lazy loading is needed till the first set of data is fetched and the count is returned so this is also a delayed dynamic setting. This is not an ideal solution in our case and apologies if my comment was misleading it was only meant for this shared case. I hope I was able to explain the issue more clearly, please feel free to ask me anymore questions if needed. |
Thanks for providing more information @kavitang. I think the reason for this issue is that the rows are not being recomputed on Thanks |
Thanks @MBilalShafi I'll give this a try and update you with the results. |
@MBilalShafi - I just tested the repo and it appears to be working correctly. |
@MBilalShafi @michelengelen - Any update on this? Will the PR be merged anytime soon? |
Hey @kavitang, the PR is in the review process, once it gets a green light from the team, it'll be merged and will be available in the next release. |
@kavitang: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Link to live example: (required)
https://stackblitz.com/edit/react-uavfyx?file=Demo.tsx
Steps:
Current behavior
Due to the delayed filtering of the data, the row count goes from a higher number to a lower one. This is adding loading skeleton rows to the grid, and even though the row count is updating correctly, the loading rows do not disappear. I have tried
forceUpdate
and alsoapiRef?.current?.unstable_replaceRows(start, []);
just in case, but neither work.Expected behavior
The loading skeleton rows should be removed if row count is changed, extra rows should not be visible.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: datagrid lazy loading rows remove
Order ID: 55516
The text was updated successfully, but these errors were encountered: