-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TextareaAutosize] Simplify logic and add test #38728
Merged
oliviertassinari
merged 4 commits into
mui:master
from
oliviertassinari:TextareaAutosize-simplify
Sep 18, 2023
Merged
[TextareaAutosize] Simplify logic and add test #38728
oliviertassinari
merged 4 commits into
mui:master
from
oliviertassinari:TextareaAutosize-simplify
Sep 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (resizeObserver) { | ||
resizeObserver.disconnect(); | ||
} | ||
}; | ||
}); | ||
}, [getUpdatedState]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dependencies, the listeners were recreated at each render.
Netlify deploy previewhttps://deploy-preview-38728--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
oliviertassinari
force-pushed
the
TextareaAutosize-simplify
branch
from
September 16, 2023 18:43
a2e2a3f
to
5ba5769
Compare
This was referenced Sep 16, 2023
oliviertassinari
force-pushed
the
TextareaAutosize-simplify
branch
4 times, most recently
from
September 16, 2023 20:24
f737871
to
8b6edaa
Compare
oliviertassinari
force-pushed
the
TextareaAutosize-simplify
branch
from
September 16, 2023 20:41
8b6edaa
to
ec8b5e6
Compare
christophermorin
pushed a commit
to christophermorin/material-ui
that referenced
this pull request
Sep 21, 2023
Released in v5.14.11 on Sep 26, 2023. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A quick continuation of #37135. I was triggered because I saw 3 PRs that fix bugs without tests on the same component:
ResizeObserver loop completed with undelivered notifications
but it's an hallucination https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors. More details in ResizeObserver#observe() firing the callback immediately results in infinite loop WICG/resize-observer#38, also faced in ResizeObserver loop error in react error overlay in dev mode mui-x#8733.I'm also removing these
if (inputRef.current) {
defensive checks. Sebastian was asking the right question in #33238 (comment). As far as I know, the origin is React 17 facebook/react#17925 which doesn't run the effect cleanup synchronously anymore.@mnajdova could we make the same change in https://github.com/mui/material-ui/pull/33277/files, moving to a layout effect? Thanks