This is the object of options passed to the Search
constructor.
suggestionOptions:Null<SuggestionOptions<T>>
Optionally override any of the default suggestion options
populateSuggestions:Null<String ‑> Promise<Array<T>>>
Optional function to asynchronously update the suggestion list when the
input's value changes. This function is called oninput
, and is given the
string value of the input. It should return a promise for a new array of
suggestions. No default exists; this is skipped if no function is provided.
onClearButtonClick:Null<Event ‑> Void>
Action to be performed when the clear button is provided. Only relevant if
clearBtn
is true
. By default, this clears the input's value and filters
the suggestion list, given no input. This function is called on mousedown
,
and the provided argument is the mouse event.
minLength:Null<Int>
Number of characters that must be typed before suggestion list is shown.
0
means the list will be shown any time the input has focus. The default
value is 1
.
container:Null<Element>
A container DOM element for the search input. This element should be
positioned (e.g. absolute
or relative
) in CSS. When using the normal
constructor, the provided input element's parent is the default. When using
the Search.createFromContainer
factory, the provided container is default.