Skip to content

If an item is dragged far beyond the bounds of the last item in the column/row/grid, move it to the end of the collection upon release #118

Description

@calvin-godfrey

The way I'm using this library, I have a LazyVerticalGrid with 3 columns. If my list has 7 items, for example, they end up organized as so:

1 2 3
4 5 6
7

If I drag items 5 or 6 straight down and release with the intent of moving them to the end of the list, they snap back to their original position because their bounding box never overlapped with the center of the bounding box for item 7. Even for item 4, it's not that difficult, if I casually swipe diagonally, to squeeze it between 5 and 7 without triggering the shouldItemsMove condition, whereas I think the intuitive behavior is to have it move to the end.

It's late where I am, but it doesn't look like it would be too hard to add a check to

to account for this behavior. I can think about this more tomorrow, but let me know what you think.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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