I encountered a similar error when using List(_:selection:rowContent:) and selecting a row after updating the data source. I used "onTapGesture" for selection to overcome this problem.
List(dataSource) { item in
HStack {
Text(item.name)
Spacer()
}
.contentShape(Rectangle())
.onTapGesture {
selection = item
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: