title: what's problem with swiftui sheet under macos
body: <p>my code works under the ios,but under macos , the sheet will repeat "show close" loop auto. when I click the button edit ,the sheet shows on the top of the window,then I click the button close on the sheet,the sheet disappeared,but appear again immediately,and close auto,apear auto ,a loop
  main view code:</p>
  
  <pre><code>struct NewWordsView: View {
      @Environment(\.managedObjectContext) var context
      @FetchRequest(entity: WordFrequency.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \WordFrequency.bookName, ascending: true)])
      var words:FetchedResults&lt;WordFrequency&gt;
      @State var showDetail:Bool = false
      @State var wordIndex:Int = 0
      var body: some View {
          List{
              ForEach(self.words.indices, id:\.self){ idx in
                  HStack{
                      Button(action: {self.deleteWords(idx:idx)}){
                          Text("X")
                      }
                      Button(action:{
                          self.showDetail.toggle()
                          self.wordIndex = idx
  
                      }){
                          Text("edit")
                      }
                      Text(self.words[idx].word!)
                          .font(.title)
                  }
              }
              .sheet(isPresented: self.$showDetail){
                  EditWordView( showDetail: self.$showDetail,word: self.words[self.wordIndex])
              }
  
  
          }
      }
  </code></pre>
  
  <p>subview code:</p>
  
  <pre><code>import SwiftUI
  
  struct EditWordView: View {
      @Environment(\.managedObjectContext) var context
      @Binding var showDetail:Bool
      let  word:WordFrequency
      @State var chinese:String = ""
      var body: some View {
  
  
              VStack{
                  Button(action:{
                      self.showDetail.toggle()
  
                  }){
                      Text("close")
  
                  }
                  Text("\(word.word ?? "")")
                      .font(.title)
  
                  TextField("中文解释", text: self.$chinese)
                  .font(.title)
  
              }
  
      }
  }
  </code></pre>