Class: TypeaheadSearch

TypeaheadSearch

new TypeaheadSearch(uri, opt_multi, opt_inputId, opt_xhrIo, opt_xmlHttpFactory, opt_useSimilar, opt_domHelper)

This class extends plana.ui.ac.AutoComplete to provide an additional search button that can be used to trigger a fulltext search by adding the 'fullsearch' parameter to requests
Parameters:
Name Type Argument Description
uri goog.Uri The server resources to use for fetching a list of suggestions. You can add custom parameters to uri to pass to the server with every request
opt_multi boolean <optional>
Whether to allow multiple entries separated with semi-colons or commas
opt_inputId string <optional>
Optional id to use for the autocomplete input element
opt_xhrIo goog.net.XhrIo <optional>
Optional XhrIo object to use. By default we create a new instance
opt_xmlHttpFactory goog.net.XmlHttpFactory <optional>
Optional factory to use when creating XMLHttpRequest objects
opt_useSimilar boolean <optional>
Use similar matches. e.g. "gost" => "ghost". This option is passed along to the server
opt_domHelper goog.dom.DomHelper <optional>
The dom helper
Source:

Extends

  • plana.ui.ac.AutoComplete

Members

<static> EventType :string

List of event types dispatched by this UI component.
Type:
  • string
Properties:
Name Type Description
NO_MATCH string The event dispatched if the filter text does not match any menu items.
MATCHES string The event dispatched if a search resulted in matches.
Source:

<static> FULLTEXT_SEARCH_PARA :string

The name of the parameter that specifies the server should perform a full search, instead of a search for suggestions. This parameter will be set to 1 if active
Type:
  • string
Source:

Methods

disposeInternal()

Source:

enterDocument()

Source:

exitDocument()

Source:

onKey(e)

Callback for when a user pressed a key. Here we are only interested in the enter key, which will trigger a search on the server.
Parameters:
Name Type Description
e goog.events.KeyEvent The key event dispatched by the key handler of the input handler control
Source:

setForceUniqueSearch(unique)

Setter whether we only do a fulltext search if the search string (i.e. input value) changed from the previous search
Parameters:
Name Type Description
unique boolean
Source: