You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my app I create components outside of the DOM sometimes, only inserting them into the DOM when necessary. This seems to collide with the logic behind <Textfield multiline/>. More specifically, the textfield's height is way too small, and then jumps to the desired height.
If the element is not inserted into the DOM yet, it appears that all attributes of computedStyle are empty strings. Changing the code to the following helps a bit:
(As a workaround, I'm currently using InputProps={{style: "min-height: 1234px"}} where 1234px is the height of the element after it "jumped" and has the correct height. Of course, this is rather brittle.)
In my app I create components outside of the DOM sometimes, only inserting them into the DOM when necessary. This seems to collide with the logic behind
<Textfield multiline/>
. More specifically, the textfield's height is way too small, and then jumps to the desired height.Here is a minimal demo: https://stackblitz.com/edit/tz3p3n?file=src%2FApp.tsx
I believe this code has something to do with it:
If the element is not inserted into the DOM yet, it appears that all attributes of
computedStyle
are empty strings. Changing the code to the following helps a bit:But now the textfield seems to jump from slightly more than the desired height to the actual desired height, still giving a jarring user experience.
The text was updated successfully, but these errors were encountered: