The Autocomplete is a combobox by default: its popup holds a search box that filters the options as you type. Set searchable to false and the same component is a select: no search box, and typing jumps to a matching option.

Nothing selected.

Untick searchable and focus the picker, then type J: the popup opens on Japan. Type J again for Jordan.

Combobox

With searchable on, opening the popup moves focus to its search box, and the list narrows as you type. The default filter matches anywhere in the label and ignores case and accents, so “turk” finds “Türkiye”.

  • filter takes your own predicate, (option, query) => boolean, or false to show every option whatever the query, as remote options do.
  • searchQuery with onSearchChange controls the text; minChars holds the search back until enough characters are typed (see the states).
  • Closing the popup clears the search, so it reopens on the full list.

Select

With searchable={false} there is no search box, and focus stays on the trigger while the popup is open. Typing works like a native <select>:

  • Letters typed within 0.7 seconds of each other build one search: “ca” lands on the first option starting with “ca”, and only if none does, on one containing it.
  • The same letter again moves to the next option starting with it, so J, J goes from Japan to Jordan.
  • Typing on the closed trigger opens the popup on the match.

Highlighting the top match

By default nothing is highlighted until you press an arrow key, so Enter on a fresh search picks nothing. Tick autoHighlight in the demo, open the picker and type “nor”: Norway is highlighted, and Enter picks it.

With autoHighlight, the first option that can be picked is highlighted whenever the list opens and whenever its contents change: as the search narrows it, or as a remote page arrives. Disabled options are skipped. A highlight you move with the arrow keys or the pointer stays put until the search changes. While a first page is still loading nothing is highlighted, so a row from the previous search is never picked.

It suits a picker people drive from the keyboard, where typing a few letters and pressing Enter is the fast path. It works the same with search in the trigger.

Options and values

Options are any objects. By default the autocomplete reads an option’s id from value (or id) and its text from label (or name); getOptionValue and getOptionLabel read other shapes, as the demo does with code and name. Values are strings or numbers.

In single mode, value is the selected id or null, and onChange receives the new id and its option. Leave them out and use defaultValue for a picker that keeps its own value. clearable (on by default) shows a clear button while something is selected, and placeholder sets the text shown while nothing is.

A selected option stays labelled after the search narrows it out of the list. For a value whose option is not in options at all, as when a form loads a saved id before its options, pass the option as selected.