-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
VirtualScroller: does not update items if only rows length changes #6639
VirtualScroller: does not update items if only rows length changes #6639
Comments
Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days. |
added demonstrator projet ( see in issue description "Reproducer") |
@mamsellem PR is welcome if you have a recommended fix? |
sure. I will submit a PR when possible |
…ws length changes
Weird I have never seen that before it should allow you to open a PR from a fork no problem? |
@mamsellem i pushed PR if you want to review. |
I don't think using deepequals is a good idea. This was my fix for this issue: line 570 of VirtualScroll.js
What do you think ? |
as mentioned |
Describe the bug
VirtualScroller with both directions does not update items if the number of columns changes but not the number of rows.
The error is in useUpdateEffect that compares prev items length with current items length.
This will return false if only the number of columns has changed.
Note that itemSize needs to be set to a constant for the issue to occur.
Reproducer
Demo on stackblitz
PrimeReact version
9.6.0+
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: