Replies: 1 comment 4 replies
-
Hello @yqiang, thanks for the report! I can not reproduce. Would you mind providing a minimal reproducible example? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm seeing an occasional crash when using the swipe-to-delete affordance created from the
onDelete(perform: ...)
modifier.The stack trace is:
My setup is that I have a SwiftUI List view and I start a
ValueObservation
using the.task
modifier on the View, something like this:The function to delete the item in question is something like this:
I think what might be happening is that when you do the swipe to delete, the item gets immediately removed from the view and then when the collection view backing the SwiftUI list view queries the datasource, it's seeing the old data, i.e., the
try await
hasn't run yet.Does this hypothesis make sense? If so, how would one go about fixing this using the new async API?
Beta Was this translation helpful? Give feedback.
All reactions