DragSelectState
class DragSelectState<Item>(initialSelection: List<Item>, val gridState: LazyGridState, compareSelector: (Item) -> Any, dragState: DragState)
A state object that can be hoisted to control and observe selected items.
In most cases, this will be created via rememberDragSelectState.
Parameters
Item
The type of the items in the list.
initialSelection
The initial selection of items.
gridState
The LazyGridState that will be used to control the items in the grid.
dragState
The current drag state.
compareSelector
A factory for selecting a property of Item to compare.
Constructors
Properties
Functions
Link copied to clipboard
Adds the provided item to the selected items.
Link copied to clipboard
Disables selection mode and clear selected items.
Link copied to clipboard
Enables selection mode with no items selected.
Link copied to clipboard
Whether or not the provided item is selected.
Link copied to clipboard
Removes the provided item from the selected items.
Link copied to clipboard
Toggle the selection mode.
Link copied to clipboard
Updates the selected items.