File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Components/Web/src/Routing Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ namespace Microsoft.AspNetCore.Components.Routing;
1212/// </summary>
1313public class NavLink : ComponentBase , IDisposable
1414{
15- private const string DisableMatchAllIgnoresLeftUriPartSwitchKey = "Microsoft.AspNetCore.Components.Routing.NavLink.DisableMatchAllIgnoresLeftUriPart " ;
16- private static readonly bool _disableMatchAllIgnoresLeftUriPart = AppContext . TryGetSwitch ( DisableMatchAllIgnoresLeftUriPartSwitchKey , out var switchValue ) && switchValue ;
15+ private const string EnableMatchAllForQueryStringAndFragmentSwitchKey = "Microsoft.AspNetCore.Components.Routing.NavLink.EnableMatchAllForQueryStringAndFragment " ;
16+ private static readonly bool _enableMatchAllForQueryStringAndFragment = AppContext . TryGetSwitch ( EnableMatchAllForQueryStringAndFragmentSwitchKey , out var switchValue ) && switchValue ;
1717
1818 private const string DefaultActiveClass = "active" ;
1919
@@ -133,7 +133,7 @@ protected virtual bool ShouldMatch(string currentUriAbsolute)
133133 return true ;
134134 }
135135
136- if ( _disableMatchAllIgnoresLeftUriPart || Match != NavLinkMatch . All )
136+ if ( _enableMatchAllForQueryStringAndFragment || Match != NavLinkMatch . All )
137137 {
138138 return false ;
139139 }
You can’t perform that action at this time.
0 commit comments