Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Table Limit of Columns?
One way to this is to use multiple TableColumnBuilder objects. Using Group removes the ability to sort via the column headers, and fancy column customization was failing for me too. TableColumnBuilders also create more easily organized code. https://developer.apple.com/documentation/swiftui/tablecolumnbuilder/ @TableColumnBuilder<ObjectType, KeyPathComparator<ObjectType>> var tableColumns1: some TableColumnContent<ObjectType, KeyPathComparator<ObjectType>> { TableColumn( ... Table(of: ObjectType.self, selection: $selection, sortOrder: $sortOrder, columnCustomization: $columnCustomization) { tableColumns1 tableColumns2 tableColumns3 } rows: { ForEach(filteredCompositions) { obj in TableRow(obj) } }
Nov ’23