DropdownMenuItem

expect fun DropdownMenuItem(text: @Composable (Modifier) -> Unit, onClick: () -> Unit, modifier: Modifier = Modifier, leadingIcon: @Composable (Modifier) -> Unit? = null, trailingIcon: @Composable (Modifier) -> Unit? = null, enabled: Boolean = true, keepOpenJsDom: Boolean = false)(source)

Parameters

text

corresponds to the headline slot on JS DOM in Material Web.

keepOpenJsDom

set to true for completely consistent behavior on JS DOM to Compose UI. However, if you set the expanded state to false in onClick, doing this is unnecessary.

actual fun DropdownMenuItem(text: (Modifier) -> Unit, onClick: () -> Unit, modifier: Modifier, leadingIcon: (Modifier) -> Unit?, trailingIcon: (Modifier) -> Unit?, enabled: Boolean, keepOpenJsDom: Boolean)(source)

Parameters

text

corresponds to the headline slot on JS DOM in Material Web.

keepOpenJsDom

set to true for completely consistent behavior on JS DOM to Compose UI. However, if you set the expanded state to false in onClick, doing this is unnecessary.

onClick

you are supposed to set the expanded state of the parent DropdownMenu or ExposedDropdownMenuBoxScope.ExposedDropdownMenu to false in this callback to ensure consistency on JS.

actual fun DropdownMenuItem(text: (Modifier) -> Unit, onClick: () -> Unit, modifier: Modifier, leadingIcon: (Modifier) -> Unit?, trailingIcon: (Modifier) -> Unit?, enabled: Boolean, keepOpenJsDom: Boolean)(source)