Context
I have been working on a customized autocomplete feature using Angular Material, and I need to adjust the height of the dropdown results box for better visibility.
Exploration
After conducting some research, I discovered that Angular Material currently does not provide built-in support for modifying the height of the autocomplete dropdown. However, there are discussions and possible solutions available for Angular Material 2 (which will be compatible with AngularJS2):
- https://github.com/angular/material/issues/5132 (potential solution 1)
- https://github.com/angular/material/issues/4772 (potential solution 2)
- https://github.com/angular/material/pull/8397 (indicates that the issue may not be fixed)
- https://groups.google.com/forum/#!topic/ngmaterial/4ActiQp3nA0 (discusses Angular Material 2 and deprecation of Angular Material)
Despite some suggestions about manipulating CSS styles (Angular Material Design Layout custom sizes) as a workaround, I haven't been successful in implementing these workarounds effectively.
Code Snippets
The project consists of an index.html
, autocomplete.js
, and server.js
files along with mockData.json file.
Below are excerpts from the index.html
, autocomplete.js
, and style.css
files. You can view the live demo hosted on Cloud9 if the server is active:
Additionally, here are snippets from the server.js
file and the contents of the mockData.json file.
Query
Is there a way to increase the height of the dropdown box displaying autocomplete results?