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

A bit sticky Drag & sort #228

Open
skywalkerlw opened this issue Oct 25, 2021 · 0 comments
Open

A bit sticky Drag & sort #228

skywalkerlw opened this issue Oct 25, 2021 · 0 comments

Comments

@skywalkerlw
Copy link

skywalkerlw commented Oct 25, 2021

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 {
            }
        }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant