Topic: Autocomplete dropdown width
CarrierLog
pro premium priority asked 2 days ago
Is there any way to control the width of the autocomplete dropdown container? I have a situation where I have a postal code field, with an async search autocomplete that shows both the postal codes and the city names. When the dropdown initiates, the width seems to be getting set to the exact width of the input field, which in my case doesn't allow enough horizontal room to show the city names.
I found a kludgy workaround, by adding an update.mdb.autocomplete event handler that finds the autocomplete-downdown-container element and sets the width to "auto". Is there a better way?
*Expected behavior*Autocomplete dropdown width should be based on the width of the dropdown options, or specified
*Actual behavior*Dropdown width seems to be set to the pixel width of the associated input field
Resources (screenshots, code snippets etc.)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 9.0.0
- Device: PC
- Browser: chrome
- OS: Windows
- Provided sample code: No
- Provided link: No