I've noticed some issues in the iOS simulator when reordering elements in a List while the view is in edit mode. The rows will sometimes disappear or repeat. I have verified that the data source is updating after the move but the rows themselves will render strangely, like some rows will be repeated or just disappear entirely. It also doesn't seem to happen on a physical device, just the simulator.
Here is a reproducible example view:
struct ContentView: View {
@State var arr = ["Dan", "Jeffery", "Alice", "Jessica", "Mary"]
var body: some View {
NavigationView {
List {
ForEach(arr, id: \.self) { user in
Text(user)
}
.onMove(perform: { from, to in
arr.move(fromOffsets: from, toOffset: to)
})
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
EditButton()
}
}
.navigationBarTitleDisplayMode(.inline)
}
.stackNavigationView()
}
}