Constructor
(abstract) new exports(updateCallback, searchBoxSelector)
Parameters:
| Name | Type | Description |
|---|---|---|
updateCallback |
function | Callback to run after a row has been selected. |
searchBoxSelector |
String | jQuery selector for input we're adding the autocomplete widget to. |
Extends
- AbstractLookupAdapter
Members
ac :AC
After AbstractAutocompleteAdapter#setupAutocomplete is run, holds a reference to the autocomplete widget used by this instance.
Type:
- AC
acCSSPrefix :String
CSS prefix for the autocomplete widget.
Type:
- String
acDelay :Number
Delay in milliseconds before performing a search.
Type:
- Number
acPrimaryTextKey :String
Key (into the row objects retrieved via the request handler)
that determines which value is used as the main text in the autocomplete
widget.
'label' corresponds to what the main application expects, but if you
want to show something different than what gets passed to the
application, you may want to change it.
Type:
- String
acSecondaryTextKey :String
Default row key for the optional secondary, smaller text shown in the autocomplete widget below each result.
Type:
- String
sourceID :String
Canonical identifier for this source. Lower-case string, no whitespace.
Type:
- String
supportedPattern :RegExp
RegExp for URLs this adapter can handle.
Type:
- RegExp
Methods
(abstract) _renderRowHandler(row)
Callback for rendering a row within the autocomplete widget, overriding default rendering.
This:
- AbstractAutocompleteAdapter#ac
Parameters:
| Name | Type | Description |
|---|---|---|
row |
Object | The row object to render |
(abstract) _requestHandler(query)
Callback for fetching row data.
This:
- AbstractAutocompleteAdapter#ac
Parameters:
| Name | Type | Description |
|---|---|---|
query |
String | The characters entered by the user |