title: SwiftUI dismiss modal sheet presented from NavigationView (Xcode Beta 5)
body: <p>I am attempting to dismiss a modal view presented via a <code>.sheet</code> in SwiftUI - called by a <code>Button</code> which is within a <code>NavigationView</code>s <code>navigationBarItems</code>, as per below:</p>
  
  <pre><code>struct ModalView : View {
  
      @Environment(\.presentationMode) var presentationMode  
  
      var body: some View {       
          Button(action: {
              self.presentationMode.value.dismiss()
          }, label: { Text("Save")})
      }   
  
  }
  
  struct ContentView : View {
  
      @State var showModal: Bool = false
  
      var body: some View {
           NavigationView { 
             Text("test")
             .navigationBarTitle(Text("Navigation Title Text"))
             .navigationBarItems(trailing:
                 Button(action: {
                     self.showModal = true
                 }, label: { Text("Add") })
                     .sheet(isPresented: $showModal, content: { ModalView() })
             )
          }
      }
  
  }
  </code></pre>
  
  <p>The modal does not dismiss when the Save button is tapped, it just remains on screen. The only way to get rid of it is swiping down on the modal.</p>
  
  <p>Printing the value of <code>self.presentationMode.value</code> always shows <code>false</code> so it seems to think that it hasn't been presented.</p>
  
  <p>This only happens when it is presented from the <code>NavigationView</code>. Take that out and it works fine.</p>
  
  <p>Am I missing something here, or is this a beta issue?</p>