-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Maui Shell weird navigation issue with timing of ApplyQueryAttributes and Page Lifecycle #24241
Copy link
Copy link
Labels
area-core-lifecycleXPlat and Native UIApplicationDelegate/Activity/Window lifecycle eventsXPlat and Native UIApplicationDelegate/Activity/Window lifecycle eventsp/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-core-lifecycleXPlat and Native UIApplicationDelegate/Activity/Window lifecycle eventsXPlat and Native UIApplicationDelegate/Activity/Window lifecycle eventsp/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
My app navigates to a MainPage with a menu that then navigates through other pages in the app until it reaches a page that requires a Flyout Menu (at which point I set the
Shell.Current.FlyoutContent).So
MainPage > PageA > PageB > PageWithFlyoutMenu
I'm performing the navigation as follows
MainPage to PageA:
await Shell.Current.GoToAsync($"PageA", true);Lifecycle event order:
Constructor>ApplyQueryAttributes>OnAppearing>OnNavigatedToPageA to PageB:
await Shell.Current.GoToAsync($"PageB");Lifecycle event order:
Constructor>ApplyQueryAttributes>OnAppearing>OnNavigatedToPageB to PageWithFlyoutMenu:
Shell.Current.FlyoutContent = IPlatformApplication.Current?.Services.GetService<MenuPage>();await Shell.Current.GoToAsync($"///PageWithFlyoutMenu-1");Lifecycle event order:
Constructor>OnAppearing>OnNavigatedTo>ApplyQueryAttributesThe issue here is that
ApplyQueryAttributesis the last to be invoked.AppShell is as follows:
And I have the following routes registered:
Can anyone shed any light on why this would be?
Thanks in advance
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14
Did you find any workaround?
No response
Relevant log output
No response