With the new Table introduced in SwiftUI 3, how can one change the row height?
struct ContentView: View {
@State private var items: [ItemModel] = Array(0...100).map { ItemModel(title: "item \($0)") }
@State private var selection = Set<ItemModel.ID>()
var body: some View {
Table(selection: $selection) {
TableColumn("title", value: \.title)
} rows: {
ForEach(items) { item in
TableRow(item)
}
}
}
}
struct ItemModel: Identifiable {
let id = UUID()
let title: String
}
For the TableColumn, only a width() modifier is available. But for the TableRow one cannot specify the height. Is there really no way to provide the height for a TableRow?