Skip to content

Commit

Permalink
fix(module: menu): make router match defaualt to all.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Oct 17, 2021
1 parent 339b055 commit d8352b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/menu/MenuItem.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public string Key
public string RouterLink { get; set; }

[Parameter]
public NavLinkMatch RouterMatch { get; set; }
public NavLinkMatch RouterMatch { get; set; } = NavLinkMatch.All;

[Parameter]
public string Title { get; set; }
Expand All @@ -48,7 +48,7 @@ public string Key

internal bool IsSelected { get; private set; }
internal bool FirstRun { get; set; } = true;
private string _key;
private string _key;

private bool TooltipDisabled => ParentMenu?.IsOpen == true || ParentMenu?._overlayVisible == true || RootMenu?.InlineCollapsed == false;

Expand Down
4 changes: 2 additions & 2 deletions components/menu/MenuLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MenuLink : AntDomComponentBase
/// Gets or sets a value representing the URL matching behavior.
/// </summary>
[Parameter]
public NavLinkMatch Match { get; set; }
public NavLinkMatch Match { get; set; } = NavLinkMatch.All;

[CascadingParameter]
public MenuItem MenuItem { get; set; }
Expand Down Expand Up @@ -69,7 +69,7 @@ protected override void OnParametersSet()
}

// Update computed state
_hrefAbsolute = Href == null ? null : NavigationManger.ToAbsoluteUri(Href).AbsoluteUri;
_hrefAbsolute = Href == null ? null : NavigationManger.ToAbsoluteUri(Href).AbsoluteUri;

if (MenuItem.FirstRun)
{
Expand Down

0 comments on commit d8352b8

Please sign in to comment.