Navigate to another subview from tabbar which is a subview

Hello,


i have a mainview which is a list of customers, by NavigationLink i go the a detailview which is a tabview.
On the second tab i have a another list with a navigation link where i go to a another detail view.
This works fine, but when i try to go back to the tabview page from the detail view i got following error:
'Tried to pop to a view controller that doesn't exist.'


does anyone have a solution how I can add more detail views to the NavigatioView from a detila view?


MainView:


NavigationView {
            List(data, id: \.id) { item in
                NavigationLink(destination: ViewCustomersTabBarDetail(customerID: item.id)) {
                   
                    HStack {
                        VStack {
                            HStack {
                                Text(item.cnr)
                                    .font(.system(size: 12))
                                    .foregroundColor(.gray)
                                Spacer()
                            }
                          
                            HStack {
                                Text(item.name)
                                    .font(.system(size: 14))
                                Spacer()
                            }
                        }
                        Spacer()
                    }
                }
            }
               
            .navigationBarTitle(Text("Kundenübersicht"), displayMode: .inline)
            .navigationBarItems(leading:
                Button(action: {
                   
                }) {
                    HStack {
                        Image(systemName: "arrow.left.circle")
                    }
            })
        }



TabView which is detai of MainView:


TabView {
            ViewCustomerDetail(customerID: self.customerID)
                .tabItem {
                    Image(systemName: "info.circle")
                    Text("Detail")
            }.tag(0)
            ViewCustomerContactPersons(customerID: self.customerID)
                .tabItem {
                    Image(systemName: "person.3")
                    Text("Ansprechpersonen")
            }.tag(1)
            ArticleContent()
                .tabItem {
                    Image(systemName: "squares.below.rectangle")
                    Text("Geräte")
            }.tag(2)
        }


Content of TabView Page two:

ZStack {
            if self.isLoading {
                ActivityIndicator()
                    .foregroundColor(Color.blue)
            }
            else {
               List(data, id: \.id) { item in
                    NavigationLink(destination: Text("hallo")) {
                        Text(item.name)
                        }.navigationBarTitle("Test")
                }
            }
        }

Replies

Seems to me to be the same problem as in https://forums.developer.apple.com/thread/124757.