SelectionList
fun <ID : Any> SelectionList(title: String, nodes: List<SelectionListNode<ID>>, selectedId: ID?, onSelect: (ID) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)
A single-choice SelectionListContent in a modal bottom sheet.
Without confirmButton, tapping an item calls onSelect and then onDismissRequest. With confirmButton, taps only call onSelect and the sheet stays open until the confirm control (which the caller wires to onDismissRequest) is used.
fun <ID : Any> SelectionList(title: String, nodes: List<SelectionListNode<ID>>, selectedIds: Set<ID>, onSelect: (ID) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, isSearchable: Boolean = false, labels: SelectionListLabels = SelectionListLabels(), confirmButton: @Composable () -> Unit? = null)
A multiple-choice SelectionListContent in a modal bottom sheet. Taps only call onSelect; toggle membership in selectedIds yourself and give the sheet a confirmButton to close it.