Utilizing the react mui library version 3.9.3 for UI components in my current project, I am facing an issue with a textarea field:
<div className={classes.fieldWrappper}>
<TextField
id="filled-multiline-static"
label="Oppgavetekst"
multiline
value={tekst}
onChange={onTekstChange}
InputProps={{classes: {root: classes.textArea}}}
InputLabelProps={{
shrink: true,
}}/>
</div>
The styling for fieldWrapper
and textArea
has been defined as follows:
fieldWrappper: {
position: 'relative',
display: 'grid',
},
textArea: {
height: '100%',
background: 'white',
},
However, the textarea does not occupy the complete height of the fieldWrapper
. This can be observed here:
https://i.sstatic.net/n1Qxc.png
It seems that MuiInputBase is inheriting the full height from the parent element.
https://i.sstatic.net/8Kftc.png
In the developer console, upon inspection, it appears that changing the MuiPrivateTextarea-root
to have a height of 100%
resolves the issue. However, I am unsure of how or where to implement this change within the codebase?