packages/ecl/components/ecl-site-header/search/ecl-site-header-search.component.ts
This component builds the search box in the ecl-site-header component. Adds specific style and functionality, emits events on search and search toggle.
ControlValueAccessor
AfterViewInit
OnDestroy
| providers |
ECL_SITE_HEADER_SEARCH_VALUE_ACCESSOR
|
| selector | ecl-site-header-search |
| imports |
FormsModule
TranslateModule
EUI_ECL_SEARCH_FORM
EUI_ECL_ICON
|
| styles |
:host {
display: block;
}
|
| templateUrl | ./ecl-site-header-search.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
HostBindings |
| searchButtonLabel |
Type : string
|
| searchInputPlaceholder |
Type : string
|
| searchInputText |
Type : string
|
| class |
Type : string
|
| e2eAttr |
Type : any
|
| tabindex |
Type : number
|
| searchEvent |
Type : EventEmitter
|
| searchToggle |
Type : EventEmitter
|
| attr.role |
Type : string
|
Default value : 'search'
|
|
The default role of the component is 'search', should not be changed. |
| class |
Type : string
|
Default value : 'ecl-site-header__search-container'
|
| getSearchBoxCssClasses |
getSearchBoxCssClasses()
|
|
Returns :
string
The classes for the ecl search form. |
| onModelChange | ||||||
onModelChange(newValue: string)
|
||||||
|
Parameters :
Returns :
void
|
| onSearch | ||||||
onSearch(evt: EclSearchFormEvent)
|
||||||
|
Parameters :
Returns :
boolean
|
| onSearchBoxToggle | ||||||
onSearchBoxToggle(evt: MouseEvent)
|
||||||
|
Parameters :
Returns :
void
|
| registerOnChange | ||||||
registerOnChange(fn: any)
|
||||||
|
Parameters :
Returns :
void
|
| registerOnTouched | ||||||
registerOnTouched(fn: any)
|
||||||
|
Parameters :
Returns :
void
|
| writeValue | ||||||
writeValue(value: any)
|
||||||
|
Parameters :
Returns :
void
|
| getCssClasses | ||||||
getCssClasses(rootClass: string)
|
||||||
|
Parameters :
Returns :
string
|
| class |
Type : string
|
Default value : 'ecl-site-header__search-container'
|
Decorators :
@HostBinding('class')
|
| Public isSearchBoxActive |
Type : unknown
|
Default value : false
|
| role |
Type : string
|
Default value : 'search'
|
Decorators :
@HostBinding('attr.role')
|
|
The default role of the component is 'search', should not be changed. |
| Public searchArrowPosition |
Type : string
|
|
The arrow position of the serahc dropdown, when in mobile mode. |
| searchLinkElement |
Type : ElementRef<HTMLAnchorElement>
|
Decorators :
@ViewChild('searchLink', {read: ElementRef})
|
|
The search link element from the view, i.e. the search button. |