This is the object of options passed to the Search constructor.

Properties

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.

keys:Null<FancySearchKeyboardShortcuts>

Optionally override any of the default keyboard shortcuts

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.

clearBtn:Null<Bool>

Boolean that determines whether a clear button should be shown. Default: true

classes:Null<FancySearchClassNames>

Optionally override any of the default class strings