I have a Form with two List sub-views, each in its own section. I populate these with the basic ForEach range pattern:
The first list works fine. When I scroll down to the second list, some of the names (and navigation links and their destination views) are from the first list! The name properties for some of the elements of the second list are invoked, and they show up properly. Some elements don't have the name property invoked, however, and they show up (and work as if) they were from the first list.
This seems like an outright bug in SwiftUI -- anyone seen it before? Are there any work arounds?
Code Block Form { Section { List { ForEach(0..<array1.count, id: \.self) { idx in NavigationLink(another_view_1()) { Text(array1[idx].name) } } } } Section { List { ForEach(0..<array2.count, id: \.self) { idx in NavigationLink(another_view_2()) { Text(array2[idx].name) } } } } }
The first list works fine. When I scroll down to the second list, some of the names (and navigation links and their destination views) are from the first list! The name properties for some of the elements of the second list are invoked, and they show up properly. Some elements don't have the name property invoked, however, and they show up (and work as if) they were from the first list.
This seems like an outright bug in SwiftUI -- anyone seen it before? Are there any work arounds?