cancellationAction and destructiveAction placement is not working in modal views presented by sheet modifier

Hello,

I use sheet modifier to display a modal view. I also use new Toolbar API to provide a few actions. I notice that items with destructiveAction and cancellationAction placement doesn't appear. confirmationAction works as expected.

Code Block swift
import SwiftUI
struct ContentView: View {
    @State private var showingAlert = false
    var body: some View {
        Button("Show modal") {
            showingAlert = true
        }.sheet(isPresented: $showingAlert) {
            NavigationView {
                Modal()
            }
        }
    }
}
struct Modal: View {
    var body: some View {
        Text("Modal")
            .toolbar {
                ToolbarItem(placement: .confirmationAction) {
                    Button("Confirm") {}
                }
                ToolbarItem(placement: .cancellationAction) {
                    Button("Cancel") {}
                }
                ToolbarItem(placement: .destructiveAction) {
                    Button("Delete") {}
                }
            }
    }
}


I have the same issue.

The toolbar works for detail views which are pushed on top of a modal.
It does not work on the first view shown with a sheet.



cancellationAction and destructiveAction placement is not working in modal views presented by sheet modifier
 
 
Q