Skip to content
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

Mui input base text area style is not applied correctly with input props on 5.15.11 from 5.15.10 #42673

Closed
TangMichael opened this issue Jun 17, 2024 · 3 comments
Labels
component: text field This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement

Comments

@TangMichael
Copy link

TangMichael commented Jun 17, 2024

Steps to reproduce

Link to live example: (required)
https://stackblitz.com/edit/react-qhoqwr?file=Demo.tsx

Steps:

  1. Add multiline props to make a text area to the input base
  2. add inputProps with style and height of 100

Current behavior

Height of the component is bigger than 100

Expected behavior

Height should be at 100

Context

It looks like the first textarea does not contain the style applied to it. I would think it would work fine with the fix done here: #41369

If you were to use the dependency of @mui/material to 5.15.10, using the same props, the textarea will correctly be at 100px. Here is another stackblitz with the dependency updated.

https://stackblitz.com/edit/react-qhoqwr-pewfah?file=package.json

I did not see anything in the release note between 5.15.10 and 5.15.11 that would do this change. Is it possible I am missing something when doing this change?

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: input base, text area

@TangMichael TangMichael added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 17, 2024
@TangMichael TangMichael changed the title Mui input base style is not applied correctly with input props on 5.15.11 from 5.15.10 Mui input base text area style is not applied correctly with input props on 5.15.11 from 5.15.10 Jun 17, 2024
@mnajdova
Copy link
Member

The style is applied, check the DOM nodes
Screenshot 2024-06-18 at 09 11 06
It is heigher because the root element has some padding. You could move the style to the root element instead. I hope this explanation helps

@mnajdova mnajdova added support: question Community support but can be turned into an improvement component: text field This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 18, 2024
@TangMichael
Copy link
Author

@mnajdova perhaps the codesandbox did not save properly with the right material version but here are screenshots to show the difference between the two versions.

The style is applied correctly if you are on version 5.15.10 as you can see here:
Screenshot 2024-06-19 at 1 19 06 PM

However, if you were to use version 5.15.11, the height is now 400 for some reason.
Screenshot 2024-06-19 at 1 18 00 PM

@TangMichael
Copy link
Author

any updates regarding this? @mnajdova Feels like this should be re-opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants