mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.09k stars 32.34k forks source link

[material-ui][TextField] Multiline FilledInput has wrong padding problem when `hiddenLabel={true}` #39610

Closed realLamram closed 1 year ago

realLamram commented 1 year ago

Duplicates

Latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/nostalgic-cherry-4flp5p

<TextField
  hiddenLabel={true}
  variant="filled"
  multiline
  size="small"
/>

Current behavior 😯

Size="small" is bigger then size="medium" in this props combination. The problem is in vertical padding.

Expected behavior 🤔

Solution:

    <TextField
      InputProps={{ sx: { py: 0 } } }
      hiddenLabel={table}
      variant="filled"
      onChange={handleChange}
      multiline
      size="small"
    />

Context 🔦

No response

Your environment 🌎

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

@realLamram

Size="small" is bigger then size="medium" in this props combination

The size looks right to me, not sure if I'm missing anything: https://codesandbox.io/s/https-github-com-mui-material-ui-issues-39610-l9cj8p

Otherwise could you share a repro? You can fork this sandbox: https://mui.com/r/issue-template-latest

realLamram commented 1 year ago

I don`t know how to fork it. But you can check this screenshot. The bug is there.

[image: Screenshot 2023-10-27 at 12.29.09.png]

čt 26. 10. 2023 v 19:51 odesílatel Albert Yu @.***> napsal:

@realLamram https://github.com/realLamram

Size="small" is bigger then size="medium" in this props combination

The size looks right to me, not sure if I'm missing anything: https://codesandbox.io/s/https-github-com-mui-material-ui-issues-39610-l9cj8p

Otherwise could you share a repro? You can fork this sandbox: https://mui.com/r/issue-template-latest

— Reply to this email directly, view it on GitHub https://github.com/mui/material-ui/issues/39610#issuecomment-1781572072, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI45Y7N2NJJZNYX4UPWMA73YBKPKHAVCNFSM6AAAAAA6PJYZ7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGU3TEMBXGI . You are receiving this because you were mentioned.Message ID: @.***>

mj12albert commented 1 year ago

I don`t know how to fork it

There is a "Fork" button in the top-right of the UI

But you can check this screenshot

Your screenshot didn't get attached here 😅 @realLamram

realLamram commented 1 year ago

Ok, I can see the image but probably there is a problem somewhere.

Here is the fork: https://codesandbox.io/s/nostalgic-cherry-4flp5p

pá 27. 10. 2023 v 14:16 odesílatel Albert Yu @.***> napsal:

I don`t know how to fork it

There is a "Fork" button in the top-right of the UI

But you can check this screenshot

Your screenshot didn't get attached here 😅 @realLamram https://github.com/realLamram

— Reply to this email directly, view it on GitHub https://github.com/mui/material-ui/issues/39610#issuecomment-1782815938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI45Y7MJ5I2ROG25AAUSAX3YBOQYZAVCNFSM6AAAAAA6PJYZ7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSHAYTKOJTHA . You are receiving this because you were mentioned.Message ID: @.***>