disabled
does not wok in List selection
struct ListDisableTest: View {
let disableIDs: [Int] = [1, 3]
@State var selection: Set<Int> = []
var body: some View {
List(1..<20, id: \.self, selection: $selection) { i in
Text("\(i)")
.tag(i)
.disabled(disableIDs.contains(i))
}
.environment(\.editMode, .constant(.active))
}
}