dropDestination(for:action:)
Defines the entire row as a destination of a drag and drop operation that handles the dropped content with a closure that you specify.
Declaration
@MainActor @preconcurrency func dropDestination<T>(for payloadType: T.Type = T.self, action: @escaping ([T]) -> Void) -> some TableRowContent<Self.TableRowValue> where T : Transferable
Parameters
- payloadType:
The expected type of the dropped models.
- action:
A closure that takes the dropped content and responds with
trueif the drop operation was successful; otherwise, returnfalse.
Return Value
A row that provides a drop destination for a drag operation of the specified type.