title: SwiftUI: Adding .onDrag blocks clicking/selecting an item in the macOS sidebar
body: <p>I have a list in my macOS app’s sidebar. When I add the <code>.onDrag</code> modifier, dragging <code>NSItemProvider</code> works correctly, but clicking/selecting the item to trigger the <code>NavigationLink</code> gets blocked.</p>
  <pre><code>struct ContentView: View {
      var body: some View {
          NavigationView {
              List(Data.items) { item in
                  NavigationLink(
                      destination: Text(item.text),
                      label: {
                          Text(item.text)
                            .lineLimit(5)
                             // Enabling dragging with .onDrag {} disables click and selection:
                            .onDrag { return NSItemProvider(object: item.url as NSURL) }
                      })
              }
              Text(&quot;Placeholder&quot;)
          }
      }
  }
  </code></pre>
  <p>How can I add the drag behavior while keeping the normal list selection behavior intact?</p>
  <p>Here ist the rest of the Minimal Reproducible Example:</p>
  <pre><code>import SwiftUI
  
  @main
  struct ListDragExampleApp: App {
      var body: some Scene {
          WindowGroup {
              ContentView()
          }
      }
  }
  
  struct Data {
      struct Item: Identifiable {
          let id = UUID()
          let text = &quot;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&quot;
          let url = URL(string: &quot;http://example.com&quot;)!
      }
      static let items = [
          Item(),
          Item(),
          Item()
      ]
  }
  </code></pre>