Selection

MethodTypeDescription
getSelected() () => T[]Currently selected option objects.
setSelected(values, opts?) (values, { notify? }) => voidSet selected values (pass [] to clear). notify: true fires change.
getValue() () => string | number | (…)[] | nullSerialized value per value-format.
selectedValue getterRead-only serialized value.
selectedItem getterFirst selected option (single-select) or null.

Dropdown

Imperative open/close added in v2.0.0.

MethodTypeDescription
open() v2.0.0 () => voidOpen the dropdown (flushes pending property writes first).
close() v2.0.0 () => voidClose the dropdown.
toggle() v2.0.0 () => voidToggle open/closed.
isOpen v2.0.0 getter/setterRead or assign the open state.

Search & scroll

The search-text control and scroll-to API are new in v2.0.0.

MethodTypeDescription
searchText v2.0.0 getterCurrent search-box text.
search(term) v2.0.0 (term: string) => voidSet the search text and filter as if typed (runs beforeSearch / min-length / async). Does not open the dropdown.
clearSearch() v2.0.0 () => voidClear the search and restore the full list.
scrollToIndex(i, opts?) v2.0.0 (i, { block? }) => booleanScroll to the option at index in the filtered list.
scrollToValue(v, opts?) v2.0.0 (v, { block? }) => booleanScroll to the option with this value (false if filtered out / under a collapsed branch).
scrollToGroup(name, opts?) v2.0.0 (name, { block? }) => booleanScroll to a group header / first group option.

Messaging & lifecycle

MethodTypeDescription
showMessage(content, opts?) v2.0.0 (content, { variant?, duration?, placement? }) => voidShow a transient toast (visible even in the fullscreen overlay).
hideMessage() v2.0.0 () => voidDismiss the transient message.
destroy() () => voidClean up (called automatically on disconnect).

Example

Imperative usage