Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ReorderableItem content should be placed in a Column to match LazyListScope #101

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions