Fixing infinite loop re-renders in TextField multiline auto resize#38453
Fixing infinite loop re-renders in TextField multiline auto resize#38453stouch wants to merge 1 commit intomui:masterfrom stouch:bug/textarea-autosize-react18-issue-infinite-loop
Conversation
Netlify deploy previewhttps://deploy-preview-38453--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
|
I could not reproduce the issue using the latest Material UI version (5.14.5): https://codesandbox.io/s/loving-breeze-q8n2cl |
|
I think you need to specify long default value for it. https://codesandbox.io/s/sleepy-lalande-ds226x |
|
I still can't reproduce it. |
|
I cannot repro #33081 on @stouch, thanks for working on this. Could you explain how/why adding the value to the dependency array fixes it? As this is a different bug, please create the issue with the repro steps |
|
Hi @DiegoAndai @michaldudak |
|
@megatron-hoa-tran Thanks! I can see the error in your reproduction. This PR does fix it, however, it breaks some other tests. @stouch, could you take a look at them? |
|
@stouch @michaldudak |
|
Hey @megatron-hoa-tran, there's still broken tests. Let's wait to see if @stouch can keep working on this. Otherwise, I encourage you to review the broken tests if you have some time so we can move forward 😊 I would also like to know how/why adding the value to the dependency array fixes the issue, especially because the error also appears when |
|
@stouch Any updates on this? |

Fixing #33081
For the record, a PR was previously made trying to fix this issue: https://github.com/mui/material-ui/pull/33253/files