### File

`packages/components/eui-select/eui-select-option.directive.ts`

### Description

Marks `<option>` as dynamic, so Angular can be notified when options change. Supports object values via ngValue and synchronizes with readonly mode.

### With ngValue for objects

Example :

    <option euiOption [ngValue]="user" [label]="user.name">{{user.name}}</option>

### With selected state

Example :

    <option euiOption [selected]="isSelected" [value]="id">Label</option>

### Notes

- Automatically applied to option elements within euiSelect
- Use ngValue for complex object binding
- Label property updates option text dynamically

See `EuiSelectControlValueAccessor`

### Extends

`NgSelectOption`

### Implements

`OnDestroy` `OnChanges` `AfterViewInit`

### Metadata

Selector | `option:not([eclSelectOption]):not([eclMultiselectOption]), option[euiOption]`

### Index

###### Inputs

- label
- ngValue
- selected

###### Accessors

- ngValue

### Constructor

`constructor()`

### Inputs

label
Type : `string`

ngValue
Type : `any`
Tracks the value bound to the option element. Unlike the value binding, ngValue supports binding to objects.

selected
Type : `boolean`

### Accessors

ngValue
set `ngValue(value: any)`

Tracks the value bound to the option element. Unlike the value binding, ngValue supports binding to objects.

Parameters :

Name | Type | Optional
value | `any` | No

Returns : `void`

# results matching ""

# No results matching ""