Constructor
new QueryFieldSelectView()
- Since:
- 2.14.0
- Source:
Extends
- SearchableSelect
Members
className
className - Returns the class names for this view element
commonFields
A list of query fields names to display at the top of the menu, above
all other category headers
excludeFields :Array.<string>
A list of query fields names to exclude from the list of options
Type:
- Array.<string>
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
inputLabel :string
Label for the input element
Type:
- string
placeholderText :string
Text to show in the input field before any value has been entered
Type:
- string
submenuStyle
- Default Value:
- "accordion"
- Source:
- See:
type :string
The type of View this is
Type:
- string
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 |
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 |
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 |
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 |
Returns:
returns true if the value is one of the values given in view.options
- Type
- boolean
render() → {SeachableSelect}
Render the view
Returns:
Returns the view
- Type
- SeachableSelect