Package-level declarations
Types
Link copied to clipboard
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.
Link copied to clipboard
object GridDragSelectDefaults
Default values for Modifier.gridDragSelect.
Functions
Link copied to clipboard
fun <Item> Modifier.gridDragSelect(items: List<Item>, state: DragSelectState<Item>, enableAutoScroll: Boolean = true, autoScrollThreshold: Float? = null, enableHaptics: Boolean = true, hapticFeedback: HapticFeedback? = null): Modifier
A Modifier that enables drag selection for a LazyGridState.
Link copied to clipboard
fun <Item> rememberDragSelectState(lazyGridState: LazyGridState = rememberLazyGridState(), initialSelection: List<Item> = emptyList()): DragSelectState<Item>
fun <Item> rememberDragSelectState(compareSelector: (Item) -> Any = { it as Any }, lazyGridState: LazyGridState = rememberLazyGridState(), initialSelection: List<Item> = emptyList()): DragSelectState<Item>
Creates a DragSelectState that is remembered across compositions.