SelectionListContent
fun <ID : Any> SelectionListContent(title: String, nodes: List<SelectionListNode<ID>>, selectedIds: Set<ID>, onSelect: (ID) -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)
A searchable one- or two-level selection list to place in your own screen or pane; SelectionList shows the same list in a bottom sheet.
Leaves are selectable and show a check when their id is in selectedIds. Parents expand inline; a collapsed parent lists its selected children as its subtitle, and parents containing a selection start expanded. While searching, every matching parent is expanded. The search query and expansion are internal UI state. Expansion resets when nodes changes. Expanding a parent scrolls its group into view after the expansion finishes; groups taller than the viewport remain scrollable. Initial selections and search results do not trigger this automatic scrolling. A blank title without confirmButton draws no header.