title: Sorting a Table with @FetchRequest's sort descriptors on macOS
body: <p>At WWDC21 in <a href="https://developer.apple.com/videos/play/wwdc2021/10018/?time=799" rel="nofollow noreferrer">What's New in SwiftUI at 13:19</a>, Apple introduced the Table container which allows the creation of multi-column tables on macOS using SwiftUI:</p>
  <p><a href="https://i.stack.imgur.com/OKlyk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OKlyk.png" alt="enter image description here" /></a></p>
  <p>We can provide a binding to an array of sort descriptors to make the columns of a table sortable. Here I'm using my <code>@FetchRequest</code>'s <code>sortDescriptors</code> for that:</p>
  <pre><code>struct ContentView: View {
  
      @Environment(\.managedObjectContext) private var viewContext
  
      @FetchRequest(sortDescriptors: [SortDescriptor(\.addDate, order: .reverse)], animation: .default)
      private var videos: FetchedResults&lt;Video&gt;
  
      @State
      private var selection = Set&lt;Video.ID&gt;()
  
      var body: some View {
          NavigationView {
              Table(videos, selection: $selection, sortOrder: $videos.sortDescriptors) { // &lt;-- HERE
                  TableColumn(&quot;Title&quot;) {
                      Text($0.title)
                  }
  
                  TableColumn(&quot;Added&quot;) {
                      Text($0.addDate)
                  }.width(120)
  
                  TableColumn(&quot;Published&quot;) {
                      Text($0.publishedAt)
                  }.width(120)
  
                  TableColumn(&quot;Duration&quot;) {
                      Text($0.duration)
                  }.width(50)
              }
          }
      }
  
  }
  </code></pre>
  <p>While this compiles and runs without errors, the sorting does not work. I can click on any columns of the table, but nothing happens.</p>
  <p>Am I missing something, or is this a known bug with <code>Table</code> on macOS?</p>