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

SelectField alignment issue with TextFields (#2601) #6470

Closed
jasonwcfan opened this issue Mar 30, 2017 · 0 comments
Closed

SelectField alignment issue with TextFields (#2601) #6470

jasonwcfan opened this issue Mar 30, 2017 · 0 comments
Labels
component: select This is the name of the generic UI component, not the React module!

Comments

@jasonwcfan
Copy link

jasonwcfan commented Mar 30, 2017

Problem description

Exactly the same as #2601, which has either regressed or was never fixed. When TextFields and SelectFields are displayed inline, they are vertically misaligned.

Versions

  • Material-UI: 0.16.1
  • React: 15.3.2
  • Browser: Chrome 56.0.2924.87

The workaround posted in #2601, setting vertical-align to bottom does work so long as the two elements are not positioned in a flex container.

In the event that they must be placed in a flex container, I've found that putting the SelectField in its own div and styling that div this way also works:

<div className='test'>
    <SelectField>{...}</SelectField>
</div>
<TextField/>
.test {
    display: flex;
    flex-direction: column-reverse;
}

Result:

(To clarify, this will not work unless both elements are in a flex container)

Hopefully this can be of use to somebody who has run into the same problem. If someone who knows a lot more than I do about this project can create a fix for this persistent little bug, that would be pretty awesome.

@oliviertassinari oliviertassinari added the component: select This is the name of the generic UI component, not the React module! label Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants