<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DynamicTableRowContent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI22DynamicTableRowContentP"
  },
  "title" : "DynamicTableRowContent"
}
-->

# DynamicTableRowContent

A type of table row content that generates table rows from an underlying
collection of data.

```
protocol DynamicTableRowContent : TableRowContent
```

## Overview

This table row content type provides drag-and-drop support for tables. Use
the [`onInsert(of:perform:)`](/documentation/SwiftUI/DynamicTableRowContent/onInsert(of:perform:)) modifier to add an
action to call when the table inserts new contents into its underlying
collection.

## Topics

### Getting row data

[`var data: Self.Data`](/documentation/SwiftUI/DynamicTableRowContent/data-swift.property)

The collection of underlying data.

[`associatedtype Data : Collection`](/documentation/SwiftUI/DynamicTableRowContent/Data-swift.associatedtype)

The type of the underlying collection of data.

### Inserting rows

[`func onInsert(of: [UTType], perform: (Int, [NSItemProvider]) -> Void) -> ModifiedContent<Self, OnInsertTableRowModifier>`](/documentation/SwiftUI/DynamicTableRowContent/onInsert(of:perform:))

Sets the insert action for the dynamic table rows.

[`struct OnInsertTableRowModifier`](/documentation/SwiftUI/OnInsertTableRowModifier)

A table row modifier that adds the ability to insert data in some base
row content.

### Supporting drag and drop

[`func dropDestination<T>(for: T.Type, action: (Int, [T]) -> Void) -> ModifiedContent<Self, OnInsertTableRowModifier>`](/documentation/SwiftUI/DynamicTableRowContent/dropDestination(for:action:))

Sets the insert action for the dynamic table rows.

## Relationships

### Conforming Types

[`ModifiedContent`](/documentation/SwiftUI/ModifiedContent)

[`ForEach`](/documentation/SwiftUI/ForEach)

### Inherits From

[`TableRowContent`](/documentation/SwiftUI/TableRowContent)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)