I have this:
struct TableRow: View {
@Binding var data: TodoItem
var body: some View {
...
}
}
and this:
List {
ForEach(data) { datum in
TableRow(data: ???) // <- what goes here?
.swipeActions {
Button(role: .destructive) {
data.delete(datum)
} label: {
Label("Delete", systemImage: "trash")
}
}
}
}