Hi,
From my ContentView I use a NavigationLink to go to an Order Overview WarehouseOrderOverview()
NavigationView{
ScrollView{
VStack{
NavigationLink(destination: WarehouseOrderOverview().environmentObject(self.settingStore).navigationBarTitle("Orders")) {
MenuButtonNavigation(title: "Order overview", color: Color.gray, icon: "doc.text.magnifyingglass").padding(.top)
}WarehouseOrderOverview:
var body: some View {
List(warehouseOrderController.warehouseOrders){ warehouseOrder in
NavigationLink(destination: WarehouseOrderView(warehouseOrder: warehouseOrder).environmentObject(self.settingStore).navigationBarTitle("Details")){
OrderTableRow(warehouseOrder: warehouseOrder)
}So far so good. If I now tap a row in that view, I get to the order details view WarehouseOrderView
NavigationView{
ScrollView() {
VStack{
VStack(spacing: -25) {
HStack(spacing: -25) {
NavigationLink(destination: WarehouseOrderLinesView(warehouseOrderLines: warehouseOrderLineController.warehouseOrderLines)){
TaskSummaryView(title: "Total Lines", color: .blue, icon: "list.dash", value: warehouseOrderLineController.warehouseOrderLines.count)
}Problem is now that when I tap the TaskSummaryView, it opens the WarehouseOrderLinesView with two navigation bars on top (one going back to Orders, the other one to the Order details [too bad I cannot post a screenshot here ...])
I believe the issue is that I create a new NavigationView in my WarehouseOrderView but I get an error when trying to use the NavigationLink without embedding it in a NavigationView. Or is there a better way than NavigationLink to open the view WarehouseOrderLinesView?
Max