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)

Class that controls the aspects related with the Select items

Parameters

items

list of items to be drawn as options.

itemContent

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

onItemSelected

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

onDismissRequest

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

itemContentPadding

the padding applied to the content of this menu item.

fluidMenu

makes the drop down menu max width. Default value is false in these case 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.

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
val fluidMenu: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val items: List<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val selectedItem: T? = null