SelectionList

fun <T : Any, K : Any> UiScope.SelectionList(items: List<T>, keyOf: (T) -> K, state: SelectionListState<K>, viewportSize: IntSize, rowHeight: Int, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, scrollRate: Int = 10, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Emits a selectable fixed-row virtual list backed by an immutable in-memory snapshot.

Selection is caller-owned, rows remain keyed, and only visible rows are constructed. A successful primary press updates state before emitting ComponentActions.SelectionChange through modifier.

Receiver

active owner-thread UI scope.

Parameters

items

immutable source snapshot.

keyOf

stable row key mapping.

state

caller-owned selection and navigation state.

viewportSize

exact positive viewport size.

rowHeight

positive fixed row height.

canLoadLeading

whether upward boundary input requests prepended rows.

canLoadTrailing

whether downward boundary input requests appended rows.

scrollRate

positive wheel multiplier.

modifier

active viewport and typed action behavior.

key

optional stable sibling identity.

content

deferred callback that emits exactly one row root.

Type Parameters

T

immutable row model type.

K

stable row key type.