packages/ecl/components/ecl-search-form/ecl-search-form.component.ts
Component representing search field - input and button, in a responsive, styled layout.
| providers |
ECL_SEARCH_FORM_VALUE_ACCESSOR
|
| selector | ecl-search-form |
| imports |
TranslateModule
FormsModule
EUI_ECL_BUTTON
EUI_ECL_FORM_GROUP
EUI_ECL_TEXT_INPUT
EUI_ECL_ICON
|
| templateUrl | ecl-search-form.component.html |
Properties |
Methods |
Inputs |
Outputs |
HostBindings |
HostListeners |
Accessors |
| buttonExtraClassses |
Type : string
|
Default value : ''
|
| inputExtraClassses |
Type : string
|
Default value : ''
|
| placeholder |
Type : string
|
| searchButtonIcon |
Type : string
|
Default value : 'search'
|
| searchButtonLabel |
Type : string
|
| searchInputText |
Type : string
|
|
The current/default search text. |
| class |
Type : string
|
| e2eAttr |
Type : any
|
| tabindex |
Type : number
|
| searchEvent |
Type : EventEmitter
|
|
This event is emited, when user performs the search action. Includes the search text from the input field. |
| attr.role |
Type : string
|
Default value : 'search'
|
| class |
Type : string
|
|
Applies the base class |
| keydown.enter |
Arguments : '$event'
|
keydown.enter(evt: Event)
|
|
Perform search when user clicks Enter when on the input field. Emits the search event with the search text. |
| onEnterKeyDown | ||||||
onEnterKeyDown(evt: Event)
|
||||||
Decorators :
@HostListener('keydown.enter', ['$event'])
|
||||||
|
Perform search when user clicks Enter when on the input field. Emits the search event with the search text.
Parameters :
Returns :
void
|
| onModelChange | ||||||
onModelChange(newValue: string)
|
||||||
|
Assigns the new input text value to the 'searchInputText' property, each time the input is changed.
Parameters :
Returns :
void
|
| onSearchClick | ||||||
onSearchClick(evt: Event)
|
||||||
|
Perform search when user clicks the search button. Emits the search event with the search text.
Parameters :
Returns :
void
|
| registerOnChange | ||||||
registerOnChange(fn: (_: any) => void)
|
||||||
|
Parameters :
Returns :
void
|
| registerOnTouched | ||||||
registerOnTouched(fn: (_: any) => void)
|
||||||
|
Parameters :
Returns :
void
|
| writeValue | ||||||
writeValue(value: any)
|
||||||
|
Parameters :
Returns :
void
|
| getCssClasses | ||||||
getCssClasses(rootClass: string)
|
||||||
|
Parameters :
Returns :
string
|
| role |
Type : string
|
Default value : 'search'
|
Decorators :
@HostBinding('attr.role')
|
| cssClasses |
getcssClasses()
|
|
Applies the base class
Returns :
string
|