Class: QueryFieldSelectView

QueryFieldSelectView()

A select interface that allows the user to search for and select metadata field(s).

Constructor

new QueryFieldSelectView()

Since:
  • 2.14.0
Source:

Extends

  • SearchableSelect

Members

className

className - Returns the class names for this view element
Source:

commonFields

A list of query fields names to display at the top of the menu, above all other category headers
Source:

excludeFields :Array.<string>

A list of query fields names to exclude from the list of options
Type:
  • Array.<string>
Source:

excludeNonSearchable :boolean

Whether or not to exclude fields which are not searchable. Set to false to keep query fields that are not seachable in the returned list
Type:
  • boolean
Source:

inputLabel :string

Label for the input element
Type:
  • string
Source:

placeholderText :string

Text to show in the input field before any value has been entered
Type:
  • string
Source:
Default Value:
  • "accordion"
Source:
See:

type :string

The type of View this is
Type:
  • string
Source:

Methods

addTooltip(element, position) → {jQuery}

addTooltip - Add a tooltip to a given element using the description in the options object that's set on the view. This overwrites the prototype addTooltip function so that we can use popovers with more details for query select fields.
Parameters:
Name Type Description
element HTMLElement The HTML element a tooltip should be added
position string how to position the tooltip - top | bottom | left | right
Source:
Returns:
The element with a tooltip wrapped by jQuery
Type
jQuery

fieldToOption(field) → {object}

fieldToOption - Converts an object that represents a QueryField model in the format specified by the SearchableSelectView.options
Parameters:
Name Type Description
field object An object with properties corresponding to a QueryField model
Source:
Returns:
An object in the format specified by SearchableSelectView.options
Type
object

initialize(options)

Creates a new QueryFieldSelectView
Parameters:
Name Type Description
options Object A literal object with options to pass to the view
Source:

isValidOption(value) → {boolean}

isValidOption - Checks if a value is one of the values given in view.options
Parameters:
Name Type Description
value string The value to check
Source:
Returns:
returns true if the value is one of the values given in view.options
Type
boolean

render() → {SeachableSelect}

Render the view
Source:
Returns:
Returns the view
Type
SeachableSelect