autoOpenbool=false Open suggestions popup during the initial render
caretnumber=query.length Initial caret position
clearbool=false Show clickable "cross" icon on the right which clears the query
classNamestring='' Additional class for the component
popupClassNamestring='' Additional class for the popup
dataSourcefunc Data source function
delaynumber=0 Input debounce delay
disabledbool=false Disable the component
focusbool=false Initial focus
hintstring='' Hint under the suggestions list
hintOnSelectionstring='' Hint under the suggestions list visible when a suggestion is selected
glassbool=false Show clickable "glass" icon on the right which applies the query
loaderbool=false Show loader when a data request is in process
placeholderstring='' Field placeholder value
onApplyfunc= Called when the query is applied. An object with fields caret, focus and query is passed as an argument
onChangefunc= Called when the query is changed. An object with fields caret and query is passed as an argument
onClearfunc= Called when the query is cleared. Called without arguments
onFocusChangefunc Called when the focus status is changed. An object with fields focus is passed as an argument
shortcutsbool=true Enable shortcut
querystring='' Initial query
Data source function
Component class calls a data source function when user input happens and passes an object with fields caret, focus and query as the only argument. The function must return an object with the fields described below. The object can be optionally wrapped in a Promise.
return object fields
caret and query should just return server values provided to data source function. These fields allow the Query Assist component to recognise and drop earlier responses from the server.
caret (string=0) Caret from request
query (string='') Query from request
styleRanges (Array<suggestion>=) Array of styleRange objects, used to highlight the request in the input field
suggestions (Array<styleRange>) Array of suggestion objects to show.
styleRange object fields
start number Range start (in characters) length number Range length (in characters) style string Style of the range. Possible values: text, field_value, field_name, operator
suggestion object fields
prefixstring= Suggestion option prefix
optionstring Suggestion option
suffixstring= Suggestion option suffix
descriptionstring= Suggestion option description. Is not visible when a group is set
matchingStartnumber (required when matchingEnd is set) Start of the highlighted part of an option in the suggestions list (in characters)
matchingEndnumber (required when matchingEnd is set) End of the highlighted part of an option in the suggestions list (in characters)
caretnumber Caret position after option completion (in characters)
completionStartnumber Where to start insertion (or replacement, when completing with the Tab key) of the completion option (in characters)
completionEndnumber Where to end insertion of the completion option (in characters)
groupstring= Group title. Options with the same title are grouped under it