onAppear on a List row not always called in iOS 16

I have a List View with pagination inside a NavigationView and everything is working great on iOS 15 but I am having an issue on iOS 16. It appears that the onAppear on the ItemRowView isn't being called when some rows appear in the list. I use the onAppear of the row to detect if the row is the last and fetch additional records from the REST api.

I am not sure what I am doing wrong.

If I comment out the NavigationLink I do not get the issue.

I have tried rewriting it using NavigationStack and I get the same exact issue.

struct ListWithPagingView: View {
	@StateObject var dataSource = ContentDataSource()

	var body: some View {
		NavigationView {
			List {
				ForEach(dataSource.items) { item in 
					NavigationLink(destination: ItemDetails(item: item)) {
            ItemRowView(item: item)
               .onAppear {
                   viewModel.onAppear(item: item)
               }
            }
			  }
			}
		}
	}
}





Hi, I found other problem with NavigationLink.disabled(_ :Bool) not working on iOS16. I put NavigationLink into HStack to try it out and disabled worked.(But I cannot explain why this works.)

It seems that onAppear is always called in the following code.

I hope this is helpful.

struct ContentView: View {

    @State var onAppeared: Set<Int> = .init()

    var body: some View {
        List() {
            ForEach(0...100, id: \.self) { num in
                HStack {
                    NavigationLink {
                        Text("\(num)")
                    } label: {
                        Cell(num: num)
                            .onAppear() {
                                NSLog("onAppear: \(num), count: \(onAppeared.count)")
                                onAppeared.insert(num)
                            }
                    }
                }
            }
        }
    }
}


struct Cell: View {
    let num: Int
    var body: some View {
        Text("label: \(num)")
    }
}
onAppear on a List row not always called in iOS 16
 
 
Q