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

[Autocomplete] display inconsistent with other form controls #35710

Open
2 tasks done
blueshirts opened this issue Jan 2, 2023 · 1 comment
Open
2 tasks done

[Autocomplete] display inconsistent with other form controls #35710

blueshirts opened this issue Jan 2, 2023 · 1 comment
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature package: material-ui Specific to @mui/material

Comments

@blueshirts
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/pedantic-tamas-1kzrk5?file=/demo.js

Steps:

  1. The example above shows that components inline with Autocomplete always get wrapped to a new line.
  2. Place a component next to an Autocomplete and notice it always goes to the next line.

Current behavior 😯

Buttons and components that follow the Autocomplete get wrapped to the next line.

Expected behavior 🤔

I would expect if space allows that components would stay on the same line. For example if I would like to place a related button to the right of an Autocomplete it is always wrapped.

Context 🔦

I am trying to place a button to the right of the Autocomplete.

Your environment 🌎

npx @mui/envinfo
  System:
    OS: macOS 12.5
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: Not Found
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Edge: Not Found
    Firefox: 108.0.1
    Safari: 15.6
  npmPackages:
    @emotion/react: ^11.10.5 => 11.10.5
    @emotion/styled: ^11.10.5 => 11.10.5
    @mui/base:  5.0.0-alpha.112
    @mui/core-downloads-tracker:  5.11.2
    @mui/icons-material: ^5.11.0 => 5.11.0
    @mui/material: ^5.11.1 => 5.11.2
    @mui/private-theming:  5.11.2
    @mui/styled-engine:  5.11.0
    @mui/system:  5.11.2
    @mui/types:  7.2.3
    @mui/utils:  5.11.2
    @types/react:  18.0.26
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript:  4.9.4
@blueshirts blueshirts added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 2, 2023
@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Jan 3, 2023
@michaldudak
Copy link
Member

I agree, there's an inconsistency in how different controls are rendered. We will consider unifying it in the next major version, as modifying it now would be a breaking change.

For a workaround, you can specify display: inline-block on the Autocomplete root (.MuiAutocomplete-root) or place it in a flex container.

@michaldudak michaldudak added enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 3, 2023
@michaldudak michaldudak added this to the v6 milestone Jan 3, 2023
@michaldudak michaldudak added the package: material-ui Specific to @mui/material label Jan 3, 2023
@michaldudak michaldudak changed the title Autocomplete Wraps Other Components [Autocomplete] display inconsistent with other form controls Jan 3, 2023
@danilo-leal danilo-leal moved this to Backlog in Material UI Dec 1, 2023
@DiegoAndai DiegoAndai removed the v6.x label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature package: material-ui Specific to @mui/material
Projects
Status: Backlog
Development

No branches or pull requests

6 participants