title: Big Sur outline view expandable items broken
body: <p>I've started a new macOS project (currently on Big Sur beta 3), and the <code>NSOutlineView</code> nodes seem to be broken. Can't tell if this is me or the os.</p>
  <p><a href="https://github.com/seanmrich/OutlineViewTest" rel="nofollow noreferrer">Here's a sample project</a> that demonstrates the issue. And an image...</p>
  <p><a href="https://i.stack.imgur.com/TGwju.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TGwju.png" alt="enter image description here" /></a></p>
  <p>As you can see, the cell is overlapping the expansion chevrons. Clicking on either chevron restores the first row to the proper layout, but not the second. Also, the autosave methods <code>persistentObjectForItem</code> and <code>itemForPersistentObject</code> are never called.</p>
  <p>The test project is super simple--all I did was add the <code>SourceView</code> component from the view library to the default app project and hook up the delegate/data source to the view controller. Also checked <code>Autosave Expanded Items</code> in IB and put a name in the <code>Autosave</code> field. Here's the entirety of the controller code:</p>
  <pre class="lang-swift prettyprint-override"><code>class ViewController: NSViewController {
      @IBOutlet var outlineView: NSOutlineView?
  
      let data = [Node(&quot;First item&quot;, 1), Node(&quot;Second item&quot;, 2)]
  }
  
  extension ViewController: NSOutlineViewDataSource {
      func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -&gt; Any {
          data[index]
      }
      
      func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -&gt; Bool {
          true
      }
      
      func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -&gt; Int {
          item == nil ? data.count : 0
      }
      
      func outlineView(_ outlineView: NSOutlineView, objectValueFor tableColumn: NSTableColumn?, byItem item: Any?) -&gt; Any? {
          item
      }
      
      func outlineView(_ outlineView: NSOutlineView, persistentObjectForItem item: Any?) -&gt; Any? {
          (item as? Node)?.id
      }
      
      func outlineView(_ outlineView: NSOutlineView, itemForPersistentObject object: Any) -&gt; Any? {
          guard let id = object as? Int else { return nil }
          return data.first { $0.id == id }
      }
  }
  
  
  extension ViewController: NSOutlineViewDelegate {
      func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -&gt; NSView? {
          guard let node = item as? Node else {
              preconditionFailure(&quot;Invalid data item \(item)&quot;)
          }
          let view = outlineView.makeView(withIdentifier: nodeCellIdentifier, owner: self) as? NSTableCellView
          view?.textField?.stringValue = node.name
          view?.imageView?.image = NSImage(systemSymbolName: node.icon, accessibilityDescription: nil)
          return view
      }
  }
  
  
  final class Node {
      let id: Int
      let name: String
      let icon: String
      
      init(_ name: String, _ id: Int, _ icon: String = &quot;folder&quot;) {
          self.id = id
          self.name = name
          self.icon = icon
      }
  }
  
  private let nodeCellIdentifier = NSUserInterfaceItemIdentifier(&quot;DataCell&quot;)
  </code></pre>
  <p>Any Mac developers left out there that can help?</p>