Members
(static) attributeMap
Provides a setter for HTML node attributes, namely the value for search text
Properties:
Type | Description |
---|---|
Object |
- Source:
(static) customSearchRE
Properties:
Name | Type | Description |
---|---|---|
The |
RegExp | regular expression used to determine if a search query is a custom search expression. A custom search expression is not processed, and directly passed to SData. |
- Source:
(static) hashTagSearchRE :RegExp
The regular expression used to determine if a search query is a hash tag search.
Type:
- RegExp
- Source:
(static) widgetTemplate
Simple that defines the HTML Markup
Properties:
Type | Description |
---|---|
Simplate |
- Source:
hashTagQueries
Properties:
Name | Type | Description |
---|---|---|
Array |
Array.<Object> | of hash tag definitions |
- Source:
queryNode
Dojo attach point to the search input
- Source:
searchText
Text that is used when no value is in the search box - "placeholder" text.
Properties:
Type | Description |
---|---|
String |
- Source:
Methods
_onClearClick()
- Deprecated:
- Yes
- Source:
_onKeyPress(evt)
Detects the enter/return key and fires search
Parameters:
Name | Type | Description |
---|---|---|
evt |
Event | Key press event |
- Source:
clear()
Sets search text to empty and removes active styling
- Source:
configure(options)
Configure allows the controller List view to overwrite properties as the passed object will be mixed in.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Properties to be mixed into Search Widget |
- Source:
customSearch(query) → {String}
Returns an unmodified search query which allows a user
to type in their own where clause
Parameters:
Name | Type | Description |
---|---|---|
query |
String | Value of search box |
- Source:
Returns:
query Unformatted query
- Type
- String
expandExpression(expression) → {String}
Expands the passed expression if it is a function.
Parameters:
Name | Type | Description |
---|---|---|
expression |
String/Function | Returns string directly, if function it is called and the result returned. |
- Source:
Returns:
String expression.
- Type
- String
getFormattedSearchQuery()
Gets the current search expression as a formatted query.
* Gathers the inputted search text
* Determines if its a custom expression, hash tag, or normal search
- Source:
getSearchExpression()
Gets the current search expression.
* Gathers the inputted search text
- Source:
hashTagSearch(query) → {String}
Returns the search query based on a hash selector
Any hash tags in the search are replaced by predefined search statements
Remaining text not preceded by a hash will receive
that views normal search formatting
Parameters:
Name | Type | Description |
---|---|---|
query |
String | Value of search box |
- Source:
Returns:
query Hash resolved query
- Type
- String
onSearchExpression(expression, widget)
The event that fires when the search widget provides a search query.
Listened to by the controlling List View
Parameters:
Name | Type | Description |
---|---|---|
expression |
||
widget |
- Source:
search()
This function is invoked from the search button and it:
* Gathers the inputted search text
* Determines if its a custom expression, hash tag, or normal search
* Calls the appropriate handler
* Fires the onSearchExpression event which listens to.
- Source: