form-field/src/form-field/form-field.component.ts
<talenra-form-field> is a wrapper for form inputs.
Minimal example:
Example :<talenra-form-field label="Email">
<input talenra-input formControlName="email" type="email" />
</talenra-form-field>Example using a hint text and validation errors:
Example :<talenra-form-field label="Email">
<input talenra-input formControlName="email" type="email" required />
<talenra-form-error [isVisible]="emailEmpty">This field is required.</talenra-form-error>
<talenra-form-error [isVisible]="emailInvalid">Email address is invalid.</talenra-form-error>
</talenra-form-field>import { FormFieldComponent } from '@talenra/components/form-field';
| changeDetection | ChangeDetectionStrategy.OnPush |
| host | { |
| selector | talenra-form-field |
| imports |
ControlContainerComponent
FormFieldResetComponent
|
| styleUrls | ./form-field.component.scss |
| templateUrl | ./form-field.component.html |
Inputs |
| handleTerminatedValues |
Type : boolean, unknown
|
Default value : false, { transform: booleanAttribute }
|
|
Determines whether Form Field shall handle terminated values. Handling terminated values is currently supported for Select only. To prevent overhead and to give consuming apps control, this is an opt-in feature. Example :See SelectComponent See OptionComponent's terminated property |
| hint |
Type : string
|
Default value : ''
|
|
Optional hint text displayed to the user Example : |
| label |
Type : string
|
Default value : ''
|
|
Label displayed to the user Example : |
| size |
Type : TFormFieldSize
|
Default value : FormFieldSize.M
|
|
Determines the size of FormField and the wrapped control. Defaults to See FormFieldSize |