This confused me based on the tutorial as adding the sortOrder seemed to make everything work. You need to make sure that the sort order is actually fed back into the data variable.
Under your fetch request have a data model that changes with the sort order
var tableData: [Club] {
return clubs.sorted(using: sortOrder)
}
Then replace the table data with the above reference, like in the below.
Table(tableData, selection: $selectedClubs, sortOrder: $sortOrder)
Post
Replies
Boosts
Views
Activity
You could do it using the below.
Table(items) {
TableColumn("Name") { item in
Text(item.name ?? "Default Value")
}
}