Hi all,
Before updating to iPadOS 18, the Table
component in SwiftUI worked as expected, allowing multiple selections using the Shift key and mouse clicks.
However, after the update, this functionality no longer works on iPadOS 18 and macOS 15 (running with Catalyst).
Here’s a simplified version of the code:
@State var selections: Set<String> = []
var body: some View {
Table(devices, selection: $selections) {
// ...
}
}
Is there any workaround for this issue, or has anyone else encountered the same problem?
Thanks!
After some attempts, I used
Table(devices, selection: $selections) {
// ...
}
.environment(\.editMode, .constant(.active))
to force the table into edit mode, which enables multi-selection. However, this adds extra padding to the header. Since there are no customization options available, I can't remove this padding.