ComboBoxScrollerMixin

external interface ComboBoxScrollerMixin

Properties

Link copied to clipboard
abstract var focusedIndex: Double

Index of an item that has focus outline and is scrolled into view. The actual focus still remains in the input field.

Link copied to clipboard
abstract var getItemLabel: JsAny

Function used to set a label for every combo-box item.

Link copied to clipboard
abstract var itemClassNameGenerator: (JsAny?) -> String?

A function used to generate CSS class names for dropdown items based on the item. The return value should be the generated class name as a string, or multiple class names separated by whitespace characters.

Link copied to clipboard
abstract var items: Array<JsAny?>

A full set of items to filter the visible options from. Set to an empty array when combo-box is not opened.

Link copied to clipboard
abstract var loading: Boolean

Set to true while combo-box fetches new page from the data provider.

Link copied to clipboard
abstract var opened: Boolean

Whether the combo-box is currently opened or not. If set to false, calling scrollIntoView does not have any effect.

Link copied to clipboard
abstract var owner: JsAny

Reference to the owner (combo-box owner), used by the item elements.

Link copied to clipboard
abstract var renderer: JsAny

Function used to render the content of every combo-box item.

Link copied to clipboard
abstract var selectedItem: JsAny

The selected item from the items array.

Link copied to clipboard
abstract var theme: String

Used to propagate the theme attribute from the host element.

Functions

Link copied to clipboard
abstract fun requestContentUpdate()

Updates the virtualizer's size and items.

Link copied to clipboard
abstract fun scrollIntoView(index: Double, alignToCenter: Boolean = definedExternally)

Scrolls an item at given index into view. By default the item is made fully visible at the bottom of the viewport (the behavior wanted on Arrow Down key press). When alignToCenter is true, the item is placed in the middle of the viewport instead, as close to center as the list allows near its start and end.