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] TextField with InputProps breaks the listbox from displaying #18330

Closed
2 tasks done
sdornan opened this issue Nov 12, 2019 · 1 comment
Closed
2 tasks done
Labels
component: autocomplete 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

@sdornan
Copy link
Contributor

sdornan commented Nov 12, 2019

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Customizing an Autocomplete's TextField with InputProps breaks the listbox from displaying. Version 4.6.0 did not exhibit this behavior.

Expected Behavior 🤔

The listbox should display.

Steps to Reproduce 🕹

https://codesandbox.io/s/material-demo-275b2?fontsize=14

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.6.1
@oliviertassinari oliviertassinari added component: autocomplete This is the name of the generic UI component, not the React module! support: question Community support but can be turned into an improvement labels Nov 12, 2019
@oliviertassinari
Copy link
Member

@sdornan The behavior has changed in #18289. It's important to deep merge the params:

    <Autocomplete
      id="combo-box-demo"
      options={top100Films}
      getOptionLabel={option => option.title}
      style={{ width: 300 }}
      renderInput={params => (
        <TextField
          {...params}
          InputProps={{ ...params.InputProps, style: { fontSize: 24 } }}
          label="Combo box"
          variant="outlined"
          fullWidth
        />
      )}
    />

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! support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants