Global Search api
NbSearchComponent
Inputs
Name | Type | Description |
hint | string | Hint showing under the input field to improve user experience |
placeholder | string | Search input placeholder |
tag | string | Tags a search with some ID, can be later used in the search service to determine which search component triggered the action, if multiple searches exist on the page. |
type | NbSearchType | Search design type, available types are modal-zoomin, rotate-layout, modal-move, curtain, column-curtain, modal-drop, modal-half |
NbSearchService
Methods
Name | Description |
activateSearch() | parameters: searchType: returns:string , tag: string void Activate (open) search component |
deactivateSearch() | parameters: searchType: returns:string , tag: string void Deactibate (close) search component |
onSearchActivate() | returns: Observable<{searchType: string; tag?: string}>
Subscribe to 'activate' event |
onSearchDeactivate() | returns: Observable<{searchType: string; tag?: string}>
Subscribe to 'deactivate' event |
onSearchInput() | returns: Observable<{term: string; tag?: string}>
Subscribe to input event |
onSearchSubmit() | returns: Observable<{term: string; tag?: string}>
Subscribe to 'submit' event (when submit button clicked) |
searchInput() | parameters: term: returns:string , tag: string void Trigger search submit by input event |
submitSearch() | parameters: term: returns:string , tag: string void Trigger search submit |
Previous page
User (Avatar)
Next page
Need some help or found an issue?
Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.