Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get autocomplete list to scroll?

Tags:

material-ui

Using material-ui autocomplete to select from about 600 items.

Is it possible to get autocomplete to offer a scrollable list of options?

like image 751
HenrikBechmann Avatar asked Nov 21 '16 18:11

HenrikBechmann


1 Answers

You can modify the CSS of the list using listStyle...

<AutoComplete
  listStyle={{ maxHeight: 200, overflow: 'auto' }}
...
/>

In the newest version of materiel ui (v4.9.11) it is possible as:

<AutoComplete
  ListboxProps={{ style: { maxHeight: 200, overflow: 'auto' } }}
...
/>
like image 194
Jeff McCloud Avatar answered Nov 17 '22 05:11

Jeff McCloud