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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextField] legend style conflicts with Bootstrap when no label is set #34298

Closed
2 tasks done
trombipeti opened this issue Sep 13, 2022 · 2 comments 路 Fixed by #34343
Closed
2 tasks done

[TextField] legend style conflicts with Bootstrap when no label is set #34298

trombipeti opened this issue Sep 13, 2022 · 2 comments 路 Fixed by #34343
Assignees
Labels
bug 馃悰 Something doesn't work component: text field This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material

Comments

@trombipeti
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

<TextField size={"small"} variant="outlined" placeholder="No label" />
current

Expected behavior 馃

expected

Steps to reproduce 馃暪

Steps:

  1. Add bootstrap to the project
  2. Create an "outlined" TextField with no label
  3. See sandbox below: simple react-ts project with @mui/material-5.10.5 and bootstrap-5.2.1

https://codesandbox.io/s/peaceful-mayer-rhzhle?file=/src/App.tsx

Context 馃敠

I have bootstrap throughout my application, and I also want to have MUI TextFields, sometimes without a label.

I think this bug has been issued in #19463, but looking at the PRs, I think the fix isn't complete and simply ignores the case when no label is set.

Manually adding width: auto; to the legend fixes the layout.

Your environment 馃寧

npx @mui/envinfo
  System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD    
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.33)
  npmPackages:
    @emotion/react: ^11.9.0 => 11.9.0
    @emotion/styled: ^11.8.1 => 11.8.1
    @mui/base:  5.0.0-alpha.96
    @mui/core-downloads-tracker:  5.10.4
    @mui/icons-material: ^5.8.4 => 5.10.3
    @mui/lab: ^5.0.0-alpha.77 => 5.0.0-alpha.98
    @mui/material: ^5.6.1 => 5.10.4
    @mui/private-theming:  5.10.3
    @mui/styled-engine:  5.10.4
    @mui/system:  5.10.4
    @mui/types:  7.2.0
    @mui/utils:  5.10.3
    @types/react: ^17.0.9 => 17.0.43
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript: ^4.3.2 => 4.6.3

Tested on Firefox 102.0esr and Chrome 105.

@trombipeti trombipeti added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 13, 2022
@trombipeti trombipeti changed the title [TextField] legend conflicts with Bootstrap when no label is set [TextField] legend style conflicts with Bootstrap when no label is set Sep 13, 2022
@michaldudak michaldudak self-assigned this Sep 14, 2022
@ZeeshanTamboli
Copy link
Member

I created a PR for it - #34343

@ZeeshanTamboli ZeeshanTamboli added bug 馃悰 Something doesn't work 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 Sep 17, 2022
@oliviertassinari oliviertassinari added the package: material-ui Specific to @mui/material label Sep 17, 2022
@trombipeti
Copy link
Author

I can confirm that the issue has been fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work component: text field This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants