Combobox Item
API reference
Properties
Property | Attribute | Description | Type | Values |
---|---|---|---|---|
active | active | True when item is highlighted either from keyboard or mouse hover | true false | |
ancestors | Parent and grandparent combobox items, this is set internally for use from combobox | ComboboxChildElement[] | ||
constant | constant | Don't filter this item based on the search text | true false | |
disabled | disabled | When true, the item cannot be clicked and is visually muted. | true false | |
guid | guid | Unique identifier, used for accessibility | guid() (default) | |
icon | icon | Custom icon to display both in combobox chips and next to combobox item text | ||
selected | selected | Set this to true to pre-select an item. Toggles when an item is checked/unchecked. | true false | |
textLabel | text-label | The main label for this item. | undefined | |
value | value | The item's associated value | any |
Events
Name | Description | Detail |
---|---|---|
calciteComboboxItemChange | Emitted whenever the item is selected or unselected. | any |
Methods
Name | Description | Signature | Returns |
---|---|---|---|
toggleSelected | Used to toggle the selection state. By default this won't trigger an event. The first argument allows the value to be coerced, rather than swapping values. | toggleSelected(coerce?: boolean) => Promise<void> | Promise<void> |
Slots
Name | Description |
---|---|
default (unnamed) | A slot for adding nested `calcite-combobox-item`s. |