Search
Extends:
The Search
component displays a menu of as-you-type results from a variety
of sources.
The search box will be 'activated' if the app's search state's getInitialSearch() value is a truthy value. If this is the case, an 'x' button will be shown next to the search field, and clicking it will clear the search.
ATTRS:
- state: SearchState instance.
Static Member Summary
Static Public Members | ||
public static |
|
Member Summary
Public Members | ||
public |
hasFocus: * Whether or not the search input has focus. |
|
public |
index: * The index of the currently-selected |
|
public |
The number of sources that are still loading results. |
|
public |
navigator: * |
|
public |
sources: * |
|
public |
state: * |
|
public |
|
Method Summary
Public Methods | ||
public |
clear() Clear the search |
|
public |
Get the position of the currently selected search result item. |
|
public |
getItem(index: *): * Get the |
|
public |
oncreate(vnode: *) |
|
public |
oninit(vnode: *) |
|
public |
onremove(vnode: *) |
|
public |
onupdate(vnode: *) |
|
public |
Navigate to the currently selected search result and close the list. |
|
public |
selectableItems(): * Get all of the search result items that are selectable. |
|
public |
Set the currently-selected search result item to the one with the given index. |
|
public |
sourceItems(): * Build an item list of SearchSources. |
|
public |
|
|
public |
view(): * |
Static Public Members
public static MIN_SEARCH_LEN: * source
Public Members
public index: * source
The index of the currently-selected
public navigator: * source
public sources: * source
public state: * source
public updateMaxHeightHandler: * source
Public Methods
public getCurrentNumericIndex(): * source
Get the position of the currently selected search result item.
Return:
* |
public getItem(index: *): * source
Get the
Params:
Name | Type | Attribute | Description |
index | * |
Return:
* |
public oncreate(vnode: *) source
Params:
Name | Type | Attribute | Description |
vnode | * |
public oninit(vnode: *) source
Params:
Name | Type | Attribute | Description |
vnode | * |
public onremove(vnode: *) source
Params:
Name | Type | Attribute | Description |
vnode | * |
public onupdate(vnode: *) source
Params:
Name | Type | Attribute | Description |
vnode | * |
public selectableItems(): * source
Get all of the search result items that are selectable.
Return:
* |
public setIndex(index: *, scrollToItem: boolean) source
Set the currently-selected search result item to the one with the given index.
Params:
Name | Type | Attribute | Description |
index | * | ||
scrollToItem | boolean |
|