title: .sheet: Shows only once and then never again
body: <p>Working with Beta4, it seems that the bug is still existing. The following sequence of views (a list, where a tap on a list entry opens another list) allows to present the <code>ListView</code> exactly once; the <code>onDisappear</code> is never called, so the <code>showModal</code> flag changes, but does not triggers the redisplay of <code>ListView</code> when tapped again. So, for each <code>GridCellBodyEntry</code>, the <code>.sheet</code> presentation works exactly once, and then never again.</p>
  
  <p>I tried around with several suggestions and workarounds, but none worked (e.g., encapsulating with a NavigationViewModel). I even tried to remove the List, because there was an assumption that the <code>List</code> causes that behaviour, but even this did not change anything.</p>
  
  <p>Are there any ideas around?</p>
  
  <p>The setup: </p>
  
  <ol>
  <li>A <code>GridCellBody</code> with this view:</li>
  </ol>
  
  <pre><code>var body: some View {
  
          GeometryReader { geometry in
  
              VStack {
  
                  List {
  
                      Section(footer: self.footerView) {
  
                          ForEach(self.rawEntries) { rawEntry in
  
                              GridCellBodyEntry(entityType: rawEntry)
                          }
                      }
                  }
                  .background(Color.white)
              }
          }
      }
  </code></pre>
  
  <ol start="2">
  <li>A <code>GridCellBodyEntry</code> with this definition:</li>
  </ol>
  
  <pre><code>struct GridCellBodyEntry: View {
  
  
      let entityType: EntityType
      let viewModel: BaseViewModel
  
  
      init(entityType: EntityType) {
  
          self.entityType = entityType
          self.viewModel = BaseViewModel(entityType: self.entityType)
      }
  
  
      @State var showModal = false {
  
          didSet {
  
              print("showModal: \(showModal)")
          }
      }
  
  
      var body: some View {
  
          Group {
  
              Button(action: {
  
                  self.showModal.toggle()
              },
                     label: {
  
                      Text(entityType.localizedPlural ?? "")
                          .foregroundColor(Color.black)
              })
              .sheet(isPresented: $showModal, content: {
  
                  ListView(showModal: self.$showModal,
                           viewModel: self.viewModel)
              })
          }.onAppear{
              print("Profile appeared")
          }.onDisappear{
              print("Profile disappeared")
          }
      }
  }
  </code></pre>
  
  <ol start="3">
  <li>A <code>ListView</code> with this definition:</li>
  </ol>
  
  <pre><code>struct ListView: View {
  
  
      // MARK: - Private properties
  
  
      // MARK: - Public interface
  
  
      @Binding var showModal: Bool
      @ObjectBinding var viewModel: BaseViewModel
  
  
      // MARK: - Main view
  
  
      var body: some View {
  
          NavigationView {
  
              VStack {
  
                  List {
  
                      Section(footer: Text("\(viewModel.list.count) entries")) {
  
                          ForEach(viewModel.list, id: \.objectID) { item in
  
                              NavigationLink(destination: ItemView(),
                                             label: {
  
                                              Text("\(item.objectID)")
                              })
                          }
                      }
                  }
              }
              .navigationBarItems(leading:
  
                  Button(action: {
  
                      self.showModal = false
                  }, label: {
  
                      Text("Close")
                  }))
  
              .navigationBarTitle(Text(viewModel.entityType.localizedPlural ?? ""))
          }
      }
  }
  </code></pre>
  
  <ol start="4">
  <li>The <code>BaseViewModel</code> (excerpt): </li>
  </ol>
  
  <pre><code>class BaseViewModel: BindableObject {
  
      /// The binding support. 
      var willChange = PassthroughSubject&lt;Void, Never&gt;()
  
      /// The context.
      var context: NSManagedObjectContext
  
      /// The current list of typed items.
      var list: [NSManagedObject] = []
  
      // ... other stuff ...
  }
  </code></pre>
  
  <p>where <code>willChange.send()</code> is called whenever something changes (create, modify, delete operations).</p>