-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
<Textfield multiline /> value doesn't show up #23031
Comments
👋 Thanks for using Material-UI! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://material-ui.com/getting-started/support/. Thanks! If you have a question on StackOverflow, you are welcome to link to it here, it might help others. |
I think I have the same problem. I have TextField multiline, I load data from api... And via Inspect I can see that it is loaded inside textarea, but the height computed by the component is set on height="0px", until you click the TextField, then it resizes correctly and sets the height. |
@jakubbloksa Make sure the component is not |
@oliviertassinari It looks like this when it first render: What do you mean by component set to
This is generated html from Inspect, you can see computed
|
@jakubbloksa If you provide a minimal live reproduction with Material-UI v5, then we could have a look. |
@oliviertassinari I just figured it out. I am using Suspense with lazy loaded components in React and this made it behave like that, I will remove it for these modules. Thanks for your time though. |
@jakubbloksa Interesting makes me think of facebook/react#14536. |
@oliviertassinari Oh, I didn't know they mount with |
You can check whether it works with React 18 alpha. I expect it may be fixed there (same as #14077 (comment)). |
I'm using the following as a workaround with my React 17 project for now: textarea.MuiInputBase-inputMultiline {
min-height: 20px;
} This is definitely not ideal but at least keeps the first line visible (better than just seeing nothing and wondering where the box is). Most of my multi-line textfields only have one line in them anyway. |
@embeddedt Do you have a reproduction of the issue? I suspect that #27840 fixes it. |
Right now I can reproduce it 100% of the time in my private project, however, I don't have a simplified reproduction case. I assume that #27840 is not going to be backported to v4, right? My understanding of v5 is that IE11 support is essentially "as-is", and could break at any point during the release cycle. Consistent IE11 support is unfortunately necessary for the time being (not my decision). |
Value that is loaded whilst being in different doesn't show until activation of field (like clicking)
Current Behavior 😯
In 3 different I have some form elements. During loading first is active and it's values are loaded, showed as suppose to. Other two tabs (which are not active) get their values (all of those tabs share same object for initial values display), fields get populated, except for fields (they actually have those values, but doesn't show until clicked)
Expected Behavior 🤔
should display text in input same as
Steps to Reproduce 🕹
Steps:
useEffect(() => onGetClaim(id), [onGetClaim()])
in parent component (Your tab control component)<TabPanel tabIndex={tabValue} value={0}> <InitialClaimForm currentClaim={currentClaim}/> </TabPanel> <TabPanel tabIndex={tabValue} value={1}> <ProductDescriptionForm currentClaim={currentClaim}/> </TabPanel> <TabPanel tabIndex={tabValue} value={2}> <SuggestedActionsForm currentClaim={currentClaim}/> </TabPanel>
Pass loaded data to components and switch active tabs. items won't show value until clicked
I would gladly provide source code, because I couldn't manage to port code to codesandox and it's hard to pin down where exactly problem is
Context 🔦
I am trying to create Edit form which is split into 3 parts by using Tabs,Tab,TabPanel(custom div) components. I load data from redux using action creator in parent component of that form.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: