search/src/search-input/search-input.component.ts
SearchInput provides consistent styling and behaviour for different kinds of search inputs. It is typically wrapped by a SearchField.
// Component class
protected searchForm: FormGroup = new FormGroup({
query: new FormControl(''),
});<!-- Component template -->
<form [formGroup]="searchForm">
<talenra-search-field>
<input talenra-search formControlName="query" />
</talenra-search-field>
</form>// Component class
protected query = '';<!-- Component template -->
<talenra-search-field>
<input talenra-search [(ngModel)]="query" />
</talenra-search-field>import { SearchInputComponent } from '@talenra/components/search';
ControlValueAccessor
AfterContentInit
| changeDetection | ChangeDetectionStrategy.OnPush |
| host | { |
| providers |
)
|
| selector | input[talenra-search] |
| styleUrls | ./search-input.component.scss |
Methods |
|
Inputs |
Outputs |
Accessors |
| disabled |
Type : null | unknown
|
|
Determines whether the control is disabled/enabled. Example : |
| kind |
Type : TSearchKind
|
Default value : SearchKind.Default
|
|
Determinates the kind (or style) of the input. Used to support style variations. NoIndent: Render a search without horizontal indent / padding. Example : |
| kind |
Type : TSearchKind
|
|
Determinates the kind (or style) of the input. Used to support style variations. NoIndent: Render a search without horizontal indent / padding. Example : |
| Public focus |
focus()
|
|
Sets the focus to the input.
Returns :
void
|
| disabled | ||||||
getdisabled()
|
||||||
|
Determines whether the control is disabled/enabled. Example :
Returns :
null | unknown
|
||||||
setdisabled(value: null | unknown)
|
||||||
|
Set the control's disabled state
Parameters :
Returns :
void
|