@microsoft/fast-foundation > ListboxOption
ListboxOption class
An Option Custom HTML Element. Implements ARIA option.
start - Content which can be provided before the listbox option content
end - Content which can be provided after the listbox option content
- The default slot for listbox option content
content - Wraps the listbox option content
Signature:export declare class ListboxOption extends FoundationElement
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(text, value, defaultSelected, selected) | Constructs a new instance of the ListboxOption class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
checked | boolean | The checked state is used when the parent listbox is in multiple selection mode. To avoid accessibility conflicts, the checked state should not be present in single selection mode. | |
content | Node[] | The default slotted content. | |
defaultSelected | boolean | The defaultSelected state of the option. | |
dirtyValue | boolean | Track whether the value has been changed from the initial value | |
disabled | boolean | The disabled state of the option. | |
form | HTMLFormElement | null | ||
initialValue | string | The initial value of the option. This value sets the value property only when the value property has not been explicitly set. | |
label | string | ||
selected | boolean | The checked state of the control. | |
selectedAttribute | boolean | The selected attribute value. This sets the initial selected value. | |
text | string | ||
value | string |
Methods
Method | Modifiers | Description |
---|---|---|
checkedChanged(prev, next) | Updates the ariaChecked property when the checked property changes. | |
defaultSelectedChanged() | ||
disabledChanged(prev, next) | ||
initialValueChanged(previous, next) | ||
selectedAttributeChanged() | ||
selectedChanged() |