!805 bug(#I2ARVI): multiple menu be set active when switch menu item

* fix: set active only when DisableNavigation is true
This commit is contained in:
Argo 2020-12-25 10:14:01 +08:00
parent cd0b1ad874
commit 00b9c83106

View File

@ -22,7 +22,7 @@ namespace BootstrapBlazor.Components
public sealed partial class MenuLink
{
private string? ClassString => CssBuilder.Default()
.AddClass("active", Item.IsActive && !Item.IsDisabled)
.AddClass("active", DisableNavigation && Item.IsActive && !Item.IsDisabled)
.AddClass("disabled", Item.IsDisabled)
.AddClassFromAttributes(AdditionalAttributes)
.Build();