[Autocomplete] How to change the dropdown width?
See original GitHub issueOrder ID 💳
32742
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
The problem in depth 🔍
Hello, As per my requirement I want to show two fileds eg:Name and Discription in a AutoComplete component . my problem is the dropdown container width is associated with Autocomplete width . I want to achive this type of dropdown. I also review documentation Country select Autocomplete. Please let me khow how we can make this work.
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
jQuery UI Autocomplete Width Not Set Correctly - Stack Overflow
I use this drop-in solution: jQuery.ui.autocomplete.prototype._resizeMenu = function () { var ul = this.menu.element; ul.outerWidth(this.element.
Read more >How to change the width of the AutoComplete control drop-down
The width of the AutoComplete drop-down is specified by the PreferredWidth property of the AutoComplete control. This does not affect the widths of...
Read more >How to extend the width of Autocomplete Dropdown list in ...
How to extend the width of Autocomplete Dropdown list in Issue Navigator for Advanced Option · Go to the Edit Announcement Banner page....
Read more >Change Size of AutoComplete DropDownList in UI for WinForms
I've can change the size of the main checkbox dropdown, but I can't figure out how to change the size of the autocomplete...
Read more >Is it possible to Set width of result-set dropdown of ...
We can't achieve that by making text fields wider because we use autocomplete fields as columns in a grid. Thank you. Mahmoud_Rabie.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can pass props to the Paper component that renders the list (Material UI v5.8.0):
https://codesandbox.io/s/countryselect-material-demo-forked-3snxsy?file=/demo.js
What i did is i inspected what kind of mui component is used to render dropdown and you may find it’s popper with set width. So i overwrite that width.
Here you go:
https://codesandbox.io/s/countryselect-material-demo-forked-3n4xob?file=/demo.js