Widgets.SearchQuery / Search Bar
In addition to the Widgets.Base these options are available in the API for the SearchQuery Widget.
Rendering
customTypeaheadTemplateFacet
Specifies that a custom HTML template for typeahead facets should be used instead of the default one. Any of the custom templates uploaded with the custom widget can be assigned to this property directly.
afterInitialize: function () { this.customTypeaheadTemplateFacet = this.customResources['myTemplate.html']; },
customTypeaheadTemplateSavedsearch
Specifies that a custom HTML template for typeahead savedsearches should be used instead of the default one. Any of the custom templates uploaded with the custom widget can be assigned to this property directly.
afterInitialize: function () { this.customTypeaheadTemplateSavedsearch = this.customResources['myTemplate.html']; },
onTypeaheadSelected
This method is called whenever a typeahead value is selected in the search bar. Implementing this method allows handling that behavior.
onTypeaheadSelected: function (obj, datum, name) { console.log('Typeahead selected ', arguments); },
onTypeaheadAutocompleted
This method is called whenever a typeahead value is autocompleted in the search bar. Implementing this method allows handling that behavior.
onTypeaheadAutocompleted: function (obj, datum, name) { console.log('Typeahead auto completed ', arguments); },