question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[AutoComplete] Impossible to specify custom width

See original GitHub issue

MUI 0.15.0-alpha.2 React 15.0.1 Chrome 49

It is currently not possible to change the width of AutoComplete. It’s hard-coded to 256px wide. Maybe another prop such as innerStyle could address this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
eduardosiqueirahauptcommented, Mar 11, 2020

use style into “renderInput” Ex: ’ renderInput={params => <TextField {…params} style={{ width: “200px” }} label=“debug” />} ’

4reactions
pjdauvertcommented, May 20, 2018

I had the same issue here, using an AutoComplete within a drawer, and I wanted the menu displaying over with a wider width. The problem seems to be in the Popover being restricted to 256px, and ‘fullWidth’ option didn’t help.

I solved the problem using : popoverProps={{ style: { width: 'auto'} }}

Read more comments on GitHub >

github_iconTop Results From Across the Web

[AutoComplete] Impossible to specify custom width · Issue #3973
It is currently not possible to change the width of AutoComplete . It's hard-coded to 256px wide. Maybe another prop such as innerStyle...
Read more >
Is it possible to set the width of a jQuery autocomplete ...
My issue is that I have multiple comboboxes on a page, and I want them to have different widths for each one. I...
Read more >
Is it possible to Set width of result-set dropdown of ...
Can I set width of Autocomplete result-set dropdown independently from text field itself? I don't mind it to be wider than actual Autocomplete...
Read more >
With autocomplete, how to change the menu size?
we set the width in JS */. So it doesn't appear that I am able to modify the size of the menu window....
Read more >
How To Create Autocomplete on an Input Field - W3Schools
Make sure the form has the autocomplete function switched off:--> ... /*position the autocomplete items to be the same width as the container:*/...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found