qwc/projects/qwc/src/lib/components/qwc-search-input/qwc-search-input.component.ts
A text field like component specifically used for input of "Search as you type" text. Emits user typed text after debouncing by 200ms
OnInit
OnChanges
ControlValueAccessor
| providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QwcSearchInputComponent), multi: true
}
|
| selector | qwc-search-input |
| templateUrl | qwc-search-input.component.html |
Properties |
Methods |
Inputs |
Outputs |
| multiLineInput |
Default value : false
|
| placeholder |
Default value : "Search"
|
| preventEnter |
Default value : false
|
| value |
Default value : ""
|
| valueChanged |
Type : EventEmitter
|
| clear |
clear()
|
|
Clear
Returns :
void
void |
| ngOnChanges | ||||||||
ngOnChanges(changes: SimpleChanges)
|
||||||||
|
Component lifecycle hook for input changes
Parameters :
Returns :
void
void |
| ngOnInit |
ngOnInit()
|
|
Component lifecycle hook Emit new value when input field's text changes.
Returns :
void
void |
| onBlur |
onBlur()
|
|
On blur
Returns :
void
void |
| onFocus |
onFocus()
|
|
On focus
Returns :
void
void |
| onInput | ||||||||
onInput(searchText: string)
|
||||||||
|
Handles the input event of the search input.
Parameters :
Returns :
void
void |
| onKeyDown | ||||||||
onKeyDown(event: KeyboardEvent)
|
||||||||
|
Handles the keydown event of the search input.
Parameters :
Returns :
void
void |
| onPaste | ||||||||
onPaste(event: any)
|
||||||||
|
Handles the paste event for the search input.
Parameters :
Returns :
void
void |
| registerOnChange | ||||||||
registerOnChange(fn: (value: string) => void)
|
||||||||
|
Registers a callback function that is called when the control's value changes.
Parameters :
Returns :
void
void |
| registerOnTouched | ||||||||
registerOnTouched(fn: () => void)
|
||||||||
|
Registers a callback function that is called when the control is touched.
Parameters :
Returns :
void
void |
| writeValue | ||||||||
writeValue(value: string)
|
||||||||
|
Writes a new value to the element.
Parameters :
Returns :
void
void |
| _searchText |
Type : string
|
Default value : ""
|
| guid |
Default value : Date.now()
|
| isCancelBtnHidden |
Default value : true
|
|
Clear button visibility flag for deleting input text |
| isFocussed |
Default value : false
|
| queryField |
Type : FormControl
|
Default value : new FormControl()
|