-
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
DataTable: Infinite loop onValueChange #5160
Comments
I don't think you can do this. You are getting |
@melloware the code replicator is not updating the value of the table back. The I understand that it will loop infinitely if I set the value of table back in |
Thanks let me take a closer look. |
Interesting it doesn't happen in NextJS when I replicated your scenario but I can definitively see the error in CRA. |
Hi, I have a similar bug with 10.0.7 by using onValueChange to count the filtered rows (table goes back quickly to all data after filtering, or goes in infinite loop after sorting). Does anybody has a workaround to count the displayed rows after filtering? |
I tried it with NextJS as well, but the issue persists. |
Weird I run your scenario in the NextJs showcase and it doesn't happen. |
Do you still have the codebox? I will double-check it against my code if I miss something. |
No what I did was take your example and then in the PrimeReact showcase replicated your scenario which is Next 12 and I couldn't get it to infinite loop. |
Describe the bug
When enabling Row Group on DataTable and adding a filter, onValueChange loops infinitely if you try to store the data that is being passed.
Reproducer
https://codesandbox.io/p/sandbox/primereact-demo-forked-8nt3cw
PrimeReact version
10.0.5
React version
17.x
Language
ES6
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The data that is being rendered by the datable should be available for processing. I need to get the filtered data in order to get the total of a column and display it in rowGroupFooterTemplate.
The text was updated successfully, but these errors were encountered: