ExposedDropdownMenuBoxScope

Functions

Link copied to clipboard
@Composable
fun ExposedDropdownMenu(expanded: Boolean, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(), matchTextFieldWidth: Boolean = true, shape: Shape = MenuDefaults.shape, containerColor: Color = MenuDefaults.containerColor, tonalElevation: Dp = MenuDefaults.TonalElevation, shadowElevation: Dp = MenuDefaults.ShadowElevation, border: BorderStroke? = null, content: @Composable ColumnScope.() -> Unit)

Popup which contains content for Exposed Dropdown Menu. Should be used inside the content of ExposedDropdownMenuBox.

@Composable
fun ExposedDropdownMenu(expanded: Boolean, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(), focusable: Boolean = true, matchTextFieldWidth: Boolean = true, shape: Shape = MenuDefaults.shape, containerColor: Color = MenuDefaults.containerColor, tonalElevation: Dp = MenuDefaults.TonalElevation, shadowElevation: Dp = MenuDefaults.ShadowElevation, border: BorderStroke? = null, content: @Composable ColumnScope.() -> Unit)
Link copied to clipboard
abstract fun Modifier.exposedDropdownSize(matchTextFieldWidth: Boolean = true): Modifier

Modifier which should be applied to a menu placed inside the ExposedDropdownMenuBoxScope. It will set constraints on the width and height of the menu so it will not overlap the text field or software keyboard.

Link copied to clipboard
fun Modifier.menuAnchor(): Modifier

abstract fun Modifier.menuAnchor(type: MenuAnchorType, enabled: Boolean = true): Modifier

Modifier which should be applied to an element inside the ExposedDropdownMenuBoxScope, typically a text field or an icon within the text field. It's responsible for expanding and collapsing the menu on click, applying semantics to the component, and requesting focus.