-
Notifications
You must be signed in to change notification settings - Fork 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
DataTable: seems to re-render all the rows on select all, even with the pagination. #2979
Comments
I got the same performance issue. It seems DataTable re-render all rows and cells every time non-value props (size, showGridlines, resizableColumns, scrollable, etc) were updated. |
Same issue here. Tried it already with the v10.0.0. Here is the reproducer: https://codesandbox.io/s/primereact-test-forked-hw8rwr?file=/src/index.js |
You are right. I have 50 rows in my datatable, even a single selection causes the datatable to re-render everything, as it is also the case when changing a field of a single row (when |
Any news on this? I see a lot of bugs being fixed but not this one. :( |
@mdimitrov94 if you need immediate support I suggest looking into PrimeReact PRO support. |
Additional Info: |
I got the same problem. Is anyone working on to fix this bug ? |
I'm having the same issue here, just tested with the version 10.8.4. Has anyone found a workaround until the issue is fixed? |
Dealing with the same issue on 10.8.4 as well |
I have been able to solve the issue by providing meaningful changes to be checked in the BodyCell props before re-rendering it. See the changes below:
There might be other meaningful changes in the props which I have missed. But with the implementation, all basic changes to the datatable trigger the necessary re-render and the unnecessary ones, as in the reported issue, are avoided. For a full implementation, you can refer to my forked primereact repo: https://github.com/accioly-cassio/custom-primereact @melloware, could the adjustments be checked and included in one of the next versions of primereact? |
Describe the bug
Hi, so I'm trying to implement a bulk edit on a DataTable with a large amount of entries. But the more entries the table contains, the more slower it is to display the select rows.
I did some tests with a lazy loading and it's much quicker without taking care of the entries number. But this way I lose the sorting and ordering feature of DataTable.
So is there a way to only re-render the visible rows of a DataTable with pagination?
Thanks!
Reproducer
https://codesandbox.io/s/primereact-test-forked-vqhyjv?file=/src/index.js
PrimeReact version
8.1.1
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
FireFox 101, Chromium 102
Steps to reproduce the behavior
ENTRY_MULTIPLIER
value to see the render speed change.Expected behavior
Render only the visible rows of the DataTable when the checkbox in the header is clicked.
The text was updated successfully, but these errors were encountered: