Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

A bit sticky Drag & sort  #228

@skywalkerlw

Description

@skywalkerlw

See the video (i have a list of 30 items), the problem is on around 2nd second

Kapture.2021-10-25.at.16.25.43.mp4

My code

VStack {
            InlineNotification(message: "Drag & drop to reorder items", style: .warning)
            ASTableView
            {
                ASSection<Int>(
                    id: 0,
                    data: sortedList,
                    dataID: \.self,
                    dragDropConfig: ASDragDropConfig(onMoveItem: { from, to in
                        move(from, to)
                    })
//                    onSwipeToDelete: { index, _ -> Bool in
//                        withAnimation
//                        {
//                            _ = self.sortedList.remove(at: index)
//                        }
//                        return true
//                    }
                )
                { item, _ in
                    GoodsListItemSimple(imageUrl: item.goodsImg, name: item.goodsName)
                        .padding(12)
                }
            }
            .onReachedBottom {
            }
        }

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