Skip to content

Add support for constraining the draggable area of ReorderableItem #126

Description

@HealthyApplications

Currently, when only a section of a LazyColumn or LazyRow contains ReorderableItems, the dragged item can still be moved across the bounds of the entire list. So even when the reordering only occurs within the reorderable items, the drag preview can overlap with unrelated content, which seems like a confusing user experience.

It would be useful to provide a way to define the bounds of a reorderable section. Some container that defines the constraints of the dragged item's offset to the start and the end of that section. This would ensure that dragging is only possible within the area where reordering can actually occur, preventing overlap with unrelated content.

One possible approach could be introducing a reorderableItems function - like the existing items function in lazy containers - that stops offset when it exceeds the start of the first or the end of the last item.

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