title: Selection of nested CoreData List SwiftUI
body: <p>Im trying to make my List selectable so I can delete or share multiple instances!
  Im trying to do that, with this method:
  <code>List(selection: $selection)</code>
  Here's my code:</p>
  <pre><code>struct ContentView: View {
  @FetchRequest(entity: Rechnungen.entity(), sortDescriptors: [
      NSSortDescriptor(keyPath: \Rechnungen.datum, ascending: false)
  ], animation: .default
  ) var rechnung: FetchedResults&lt;Rechnungen&gt;
     var body: some View {
         //some come where I call:
         ContentListView(rechnung:rechnung)
     }
  }
  struct ContentListView: View {
  @State var selection = Set&lt;Rechnungen&gt;()
  var rechnung: FetchedResults&lt;Rechnungen&gt;
     var body: some View {
          List(selection: $selection) {
             ForEach(rechnung) { beleg in
                      //displaying my instances here
              }
          }
      }
  }
  </code></pre>
  <p>If I display the EditButton() in my toolbar then I can see the option to select my Instances but I can't select anything.</p>
  <p>I guess my <code>@State var selection = Set&lt;Rechnungen&gt;()</code>is wrong. But I can't find anything that works.</p>
  <p>Thank you in advance,</p>