ASCollectionView icon indicating copy to clipboard operation
ASCollectionView copied to clipboard

A bit sticky Drag & sort

Open skywalkerlw opened this issue 5 years ago • 0 comments

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

https://user-images.githubusercontent.com/2090084/138644966-15ccb984-9e95-4207-b337-3e0e41b76a23.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 {
            }
        }

skywalkerlw avatar Oct 25 '21 06:10 skywalkerlw