Hi everyone,
I’m having an issue with a SwiftUI Table inside a Form in a macOS app. When the Form style is set to .grouped, the Table does not resize to the full width of the Form or Sheet. However, when I switch to a .plain style, it resizes correctly.
Here’s a simplified version of my code:
Section(header: Text("Header")) {
Table(data) {
TableColumn("Column 1", value: \.col1)
TableColumn("Column 2", value: \.col2)
// Add more columns as needed
}
.frame(height: 100)
}
}
.formStyle(.grouped) // Issue occurs only with this style
Has anyone else experienced this? Any workarounds or suggestions would be greatly appreciated!
Thanks!