Skip to content

[Navigation] Navigating back in a Frame to a page with TabBarNavigator does not maintain the original state #3016

@kazo0

Description

@kazo0

Given a Navigation Route organized like this:

new RouteMap("", View: views.FindByViewModel<ShellModel>(),
    Nested:
    [
        new ("Main", View: views.FindByViewModel<MainModel>(), IsDefault:true,
            Nested:
            [
                new ("Second", View: views.FindByViewModel<SecondModel>(), IsDefault:true),
                new ("Third", View: views.FindByView<ThirdPage>()),
                new ("Fourth", View: views.FindByView<FourthPage>()),
            ]
        ),
        new ("Sibling", View: views.FindByViewModel<SiblingModel>())
    ]
)

Steps to repro

  • Navigate to the Third route using a TabBarNavigator from Main
  • From within ThirdPage, navigate to a route that is outside of the nested Main routes (Sibling route)
  • Perform a back navigation from the SiblingPage
  • Observe that the navigation back leads to the MainPage being should but it resets the selected region to be whichever nested route is set as default

Expected Outcome

The back navigation from Sibling to Main should maintain the state of the previously selected TabBarItem's region. Meaning we should be navigating back and land on the ThirdPage

Sample app attached:
UnoApp149.zip

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't workingtriage/untriagedIndicates an issue requires triaging or verification.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions