Show:

Q filter Class

Implements an input that filters an associated list (like an autocomplete)

Constructor

Q filter

(
  • [$options]
)
String

Parameters:

  • [$options] Array optional

    Override various options for this tool

    • [name='filter'] String optional

      The name of the text input

    • [value=''] String optional

      The initial value of the text input

    • [placeholder] String optional

      Any placeholder text

    • [placeholders={}] Array optional

      Options for Q/placeholders, or null to omit it

    • [results=''] String optional

      HTML to display in the results initially. If setting them later, remember to call stateChanged('results')

    • [onFilter] Q.Event optional

      Name of a JS event handler that is meant to fetch and update results by editing the contents of the element pointed to by the second argument. The first argument is the content of the text input.

Returns:

String:

Item Index