select/src/option-group/option-group.component.ts
OptionGroup is a container for single options in the context of a Select.
// Component class
sampleForm: FormGroup = new FormGroup({
animalia: new FormControl(),
});<!-- Component template -->
<form [formGroup]="sampleForm">
<talenra-form-field label="Size">
<talenra-select formControlName="animalia">
<talenra-option-group label="Insects">
<talenra-option value="ant" label="Ant" />
<talenra-option value="bee" label="Bee" />
</talenra-option-group>
<talenra-option-group label="Mammals">
<talenra-option value="cat" label="Cat" />
<talenra-option value="cow" label="Cow" />
<talenra-option value="dog" label="Dog" />
</talenra-option-group>
</talenra-select>
</talenra-form-field>
</form>import { OptionGroupComponent } from '@talenra/components/select';See FormFieldComponent See SelectComponent
| changeDetection | ChangeDetectionStrategy.OnPush |
| host | { |
| selector | talenra-option-group |
| templateUrl | ./option-group.component.html |
| styleUrl | ./option-group.component.scss |
Inputs |
| label |
Type : string
|
Default value : ''
|
|
Label to be displayed for the option group |