Skip to content

fix: Highlight only the current Samples link in the demo menu - #54

Merged
gvreddy04 merged 1 commit into
mainfrom
features/26111205-left-menu-selection
Nov 12, 2026
Merged

gvreddy04 merged 1 commit into
mainfrom
features/26111205-left-menu-selection

Conversation

@gvreddy04

Copy link
Copy Markdown
Collaborator

Since .NET 10, a NavLink with Match="All" ignores the query string and fragment. The Samples menu links differ only by ?category=, so after the .NET 11 upgrade every Samples link showed as selected at once.

Set the AppContext switch
Microsoft.AspNetCore.Components.Routing.NavLink.EnableMatchAllForQueryStringAndFragment at the start of Program.cs, so the menu matches the full URL again as it did on net9.0.

Since .NET 10, a NavLink with Match="All" ignores the query string and
fragment. The Samples menu links differ only by ?category=, so after the
.NET 11 upgrade every Samples link showed as selected at once.

Set the AppContext switch
Microsoft.AspNetCore.Components.Routing.NavLink.EnableMatchAllForQueryStringAndFragment
at the start of Program.cs, so the menu matches the full URL again as it
did on net9.0.
@gvreddy04 gvreddy04 added this to the 2.0.0 milestone Nov 12, 2026
@gvreddy04 gvreddy04 self-assigned this Nov 12, 2026
@gvreddy04
gvreddy04 merged commit f7aa5c6 into main Nov 12, 2026
1 of 2 checks passed
@gvreddy04
gvreddy04 deleted the features/26111205-left-menu-selection branch November 12, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant