Input Widget JS


The SearchStax Site Search solution’s Input widget provides the search input field with autosuggest/autocomplete capabilities.

Usage

searchstax.addSearchInputWidget("searchstax-input-container", {
    suggestAfterMinChars: 3,
 });

  • suggestAfterMinChars – default 3. Number of characters needed for autosuggest to start triggering
  • hooks.beforeAutosuggest – callback function that gets called before firing autosuggest. autosuggestProps are being passed as a property and can be modified, if passed along further search will execute with modified properties, if null is returned then event gets canceled and search never fires.
  • hooks.afterAutosuggest – callback function that gets called after autosuggest has values but before rendering. It needs to return same type of data but it can be modified.
  • templates – template override. See examples in searchstax-ux-js.

Example

See the full example at searchstax-ux-js.

Questions?

Do not hesitate to contact the SearchStax Support Desk.