How to programatically select row in List in SwiftUI
Issue #711
List has a selection parameter where we can pass selection binding. As we can see here selection is of type optional Binding<Set<SelectionValue>>? where SelectionValue is any thing conforming to Hasable
1 | (iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) |
So we can programatically control selection by tagging row with our own Tag
1 | struct SideView: View { |