KeySelectDropdown

fun KeySelectDropdown(label: String, keys: List<KeySummary>, selectedId: Long?, onSelect: (Long?) -> Unit, modifier: Modifier = Modifier, allowAuto: Boolean = false, emptyLabel: String = stringResource(R.string.common_select_key), autoLabel: String = stringResource(R.string.common_auto), keyFilter: (KeySummary) -> Boolean = { true }, expanded: Boolean? = null, onExpandedChange: (Boolean) -> Unit? = null, lineFormatter: (KeySummary) -> String = { "${it.primaryUserId} (${formatKeyId(it.masterKeyId)})" })

Exposed dropdown for selecting a key from keys.

Parameters

selectedId

Currently selected master key id, or null.

onSelect

Callback with the chosen key id (null when "auto" is picked).

allowAuto

Whether to offer an automatic/no-selection entry.

keyFilter

Predicate restricting which keys are shown.

lineFormatter

Formats each key's display line.