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
  • Navigate to Sibling via a button that is on the MainPage
  • Navigate Back
  • Observe that the navigation back leads to the MainPage being shown 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 the TabBar should have the TabBarItem connected to Third being selected

Sample app attached:
UnoApp149.zip

Metadata

Metadata

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