Apparently, there is a bug in the ".confirmation Dialog" extension. Until they fix the issue use ".action Sheet" like the below code:
.actionSheet(isPresented: $showDeletionConfirmation) {
ActionSheet(
title: Text("Sure?"), message: Text("Do you want to continue?"),
buttons: [
.cancel(), .destructive(Text("Yes"), action: {
print("Deleting...")
item = nil
})
]
)
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: