Skip to content

SiAutocompleteListboxDirective documentation

selectorexported-as
[siAutocompleteListboxFor]siAutocompleteListbox

Input Properties

NameTypeDefaultDescription
id
string__si-autocomplete-listbox-${SiAutocompleteListboxDirective.idCounter++}
siAutocompleteDefaultIndex
number0Index of the option that is pre-selected when the listbox opens. Pass -1 to start with no active item.
siAutocompleteListboxFor
Required
SiAutocompleteDirective<T>The SiAutocompleteDirective instance this listbox is attached to.

Output Properties

NameTypeDescription
siAutocompleteOptionSubmitted
(T | undefined)

Attributes and Methods

NameTypeDefaultDescription
(readonly) active
(SiAutocompleteOptionDirective<T> | null)

Types Documentation

Constructor
() => {}
Properties
listbox: WritableSignal<(SiAutocompleteListboxDirective<T> | undefined)> = ...
Accessors
get active: (SiAutocompleteOptionDirective<T> | null | undefined)
get activeDescendant: string
Methods
Parameters
event: KeyboardEvent
Constructor
() => {}
Properties
active: WritableSignal<boolean> = ...
When true , the option cannot be selected and is rendered in a disabled state.
disabledInput: InputSignalWithTransform<boolean, unknown> = false
element: ElementRef<HTMLElement> = ...
id: InputSignal<string> = __si-autocomplete-option-${SiAutocompleteOptionDirective.idCounter++}
parent: SiAutocompleteListboxDirective<unknown> = ...
The value emitted when this option is selected or activated.
value: InputSignal<(T | undefined)> = undefined
idCounter: number = 0
Accessors
Whether the option is disabled.
get disabled: boolean from Highlightable.disabled
Methods
click: () => void
setActiveStyles: () => void from Highlightable.setActiveStyles
setInactiveStyles: () => void from Highlightable.setInactiveStyles

Except where otherwise noted, content on this site is licensed under MIT License.