SelectItemsParams

data class SelectItemsParams<T>(val items: List<T>, val itemContent: @Composable (T) -> Unit, val onItemSelected: (T) -> Unit, val onDismissRequest: () -> Unit, val itemContentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, val fluidMenu: Boolean = false, val selectedItem: T? = null)(source)

Class that controls the aspects related with the Select items

Parameters

T

The type of items in the selection list.

Constructors

Link copied to clipboard
constructor(items: List<T>, itemContent: @Composable (T) -> Unit, onItemSelected: (T) -> Unit, onDismissRequest: () -> Unit, itemContentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, fluidMenu: Boolean = false, selectedItem: T? = null)

Properties

Link copied to clipboard

This makes the drop down menu max-width. Default value is false, in this case the drop down menu width will depend on the content. When set as true, the drop down menu max width will be the same size of the select component.

Link copied to clipboard

Composable function of how each item is going to be drawn.

Link copied to clipboard

The padding applied to the content of this menu item.

Link copied to clipboard
val items: List<T>

List of items to be drawn as options.

Link copied to clipboard

Called when the user requests to dismiss the menu, such as by tapping outside the menu's bounds.

Link copied to clipboard

The callback that is triggered when one option is selected. Selected object comes as a parameter of the callback.

Link copied to clipboard

The currently selected item, if any.