SelectionListState

class SelectionListState<K : Any>(val listState: VirtualListState<K> = VirtualListState(), initialSelection: K? = null)(source)

Caller-owned selection and navigation state for a generic SelectionList, confined to its construction execution owner.

A nullable key represents no selection, while distinct writes reconstruct only the currently materialized rows.

Parameters

initialSelection

optional initially selected key.

Type Parameters

K

stable item key type.

Constructors

Link copied to clipboard
constructor(listState: VirtualListState<K> = VirtualListState(), initialSelection: K? = null)

Properties

Link copied to clipboard

virtual navigation and shared Scrollbar state.

Link copied to clipboard

Current selected key, or null when no row is selected.

Functions

Link copied to clipboard

Clears the current selection and returns whether a value was removed.

Link copied to clipboard
fun select(key: K): Boolean

Selects key and returns whether the value changed.