-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes swipe gesture doesn't reset (when inside a scroll view / list) #4
Comments
Facing this with leadingActions specifically |
Workaround: just add a .id(UUID()) to SwipeView I'm using it inside a List and it works |
Could you please tell me more about it? I used the following code snippet, but it wouldn't work, swipe gesture doesn't reset.
|
Important informationJust making sure we're on the same page here: to return to the SwipeView {
Text("Swipe to Trigger, Then Return")
.frame(maxWidth: .infinity)
.padding(.vertical, 32)
.background(Color.blue.opacity(0.1))
.cornerRadius(32)
} trailingActions: { context in
SwipeAction("Bounce Back") {
context.state.wrappedValue = .closed /// here!
}
.allowSwipeToTrigger()
}
.swipeActionWidth(140) This works fine. BounceBack.movThe actual problemThe problem in this issue is about the swipe view getting stuck midway between the expanded/closed state. I can't consistently reproduce this, but it seems to have something to do with scrolling. |
The issue about the swipe view getting stuck midway between the expanded/closed state probably because of the |
Happens occasionally - the swipe view gets stuck.
View more details...
The text was updated successfully, but these errors were encountered: