-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Open
ReorderableItem content should be placed in a Column to match LazyListScope#101
Description
When using LazyListScope.items the content is laid out in a Column. However, with ReoderableItem the content is laid out in a Box. To work around this I do:
@Composable
fun LazyItemScope.ReorderableItemColumn(
state: ReorderableLazyListState,
key: Any,
modifier: Modifier = Modifier,
enabled: Boolean = true,
animateItemModifier: Modifier = Modifier.animateItem(),
content: @Composable ReorderableCollectionItemScope.(isDragging: Boolean) -> Unit,
) {
ReorderableItem(
state = state,
key = key,
modifier = modifier,
enabled = enabled,
animateItemModifier = animateItemModifier,
content = { isDragging ->
Column {
content(isDragging)
}
}
)
}
Perhaps changing this to a Column instead of Box fixes it?
Metadata
Metadata
Assignees
Labels
No labels