aheze / SwipeActions

Add customizable swipe actions to any view.
https://twitter.com/aheze0/status/1646399867764510721
MIT License
1.08k stars 46 forks source link

I used it in a list, it doesn't scroll #24

Closed MineRala closed 1 week ago

MineRala commented 3 months ago

I used the SwipeAction library for the items in the list, this time the list does not scroll. I couldn't scroll because the cells were surrounded by SwipeAction. How can I solve the problem? List { ForEach(lists) { list in ZStack { SwipeView { GroupListView(list: list) .background(Color.white) .cornerRadius(10) .shadow(radius: 5) } trailingActions: {_ in editTrailingAction(for: list) deleteTrailingAction(for: list) } .swipeActionWidth(80) NavigationLink(destination: ListView(products: list.products, title: list.title)) { EmptyView() }.opacity(0.0) } .listRowBackground(Color.clear) .listRowSeparator(.hidden) } } .listStyle(.plain)

iAmNaz commented 1 month ago

Same issue here when I have a lot of list items that fills the scren.

ngimelliUW commented 1 month ago

Same thing - more generally in a scrollable view

jacobcavin commented 1 month ago

Anyone find a solution to this?

chitraarasu commented 1 month ago

@aheze Can you share any solution for this issue. Scroll not working

chitraarasu commented 1 month ago

Hi all, I got solution for this issue use .swipeActionWidth(50).

@jacobcavin @ngimelliUW @iAmNaz @MineRala

serddmitry commented 1 month ago

I've found that replacing a highPriorityGesture in the library with a simple gesture works better in a ScrollView. Also set .swipeMinimumDistance(30).

kenzo-ai commented 2 weeks ago

I've found that replacing a highPriorityGesture in the library with a simple gesture works better in a ScrollView. Also set .swipeMinimumDistance(30).

Thanks, saved my life. 👍

RobertDresler commented 1 week ago

No need to replace gesture - just setting . swipeMinimumDistance(24) works for me.

MineRala commented 1 week ago

THANK YOU ALL.