-
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: Cannot update a component while rendering a different component warning #5556
Comments
Your reproducer works fine for me. also you are doing it wrong from your example. onValueChange={(e) => options.editorCallback(e.value)} Already handles changing the That is not how cell editing works. |
Hello @melloware, My reproducer works functionally, but it triggers a React error in the console. Sorry, but I don't understand what's wrong in my example. The How can I synchronize DataTable data without using Thank you for your response. |
I don't have any errors in the console using your reproducer? I can edit say Quantity from 24 to 26 and it works without error? |
I've got the bellow error on editing a quantity, can you retry plz? Thank you!
|
IMHO, this warning is due to this state update https://github.com/primefaces/primereact/blob/master/components/lib/datatable/BodyCell.js#L71C1-L73C6. According to facebook/react#18178 (comment), a Thank you :) |
weird yep I do see it now. |
OK PR Submitted. Good catch. |
Thank you :) |
The fix in v10.3.0 doesn't solve the problem, there is still console errors when updating a cell |
A bunch of changes accidentally got rolled back. I am adding them back in now. |
Fix primefaces#5556 Fix primefaces#5487 Fix primefaces#5457 Fix primefaces#5370 Fix primefaces#4051
@melloware With v10.3.1, there is still the issue, this ticket should be reopened? |
Weird. Let me look again because locally running in NextJS this was working without the warning error after this change. |
@BAISTM I am able to reproduce it locally. Very strange but the stack trace line numbers don't really help. This is weird. |
…ing a different component warning
Describe the bug
I've got the below console error when updating a cell
Minimal code reproduction:
Reproducer
https://codesandbox.io/p/sandbox/primereact-demo-forked-v94dr7?file=%2Fsrc%2FApp.js
PrimeReact version
10.1.1
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The error
Cannot update a component
should not be displayed in the console.The text was updated successfully, but these errors were encountered: