Select Input
Commonly used select input component.
Examples
Select Field
Select and multi select input fields
2. Template Driven (Simple Strings)
Selected:
3. Signal Binding
Binding directly to a WritableSignal
Signal Value: IN
Multi Select Field
Select and multi select input fields
Form Value:
{
"team": [
1,
3
],
"skills": [
"Angular"
]
}Code
<wdc-select-input
[ngModel]="selectValue()"
(ngModelChange)="selectValue.set($event)"
label="Single Select"
[options]="selectOptions"
>
</wdc-select-input>
<wdc-select-input
[ngModel]="multiSelectValue()"
(ngModelChange)="multiSelectValue.set($event)"
label="Multi Select (Searchable)"
[multiple]="true"
[searchable]="true"
[options]="selectOptions"
>
</wdc-select-input>API Reference
| Input | Type | Default | Description |
|---|---|---|---|
| options | { label: string; value: any }[] | undefined | Options for the select input field. |
| disabled | boolean | false | Whether the select input field is disabled. |
| multiple | boolean | false | Whether the select input field supports multiple selection. |
| searchable | boolean | false | Whether the select input field supports searching. |
| label | string | undefined | Label text for the select input field. |
| placeholder | string | Select an option | Placeholder text for the select input field. |
| error | string | null | null | Error message to display when the select input field is invalid. |
| onChange | any | undefined | Callback function called when the value of the select input field changes. |