mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 13:08:23 +08:00
fix(module: menu): the selected menu item would unselect itself (#611)
This commit is contained in:
parent
6d0d8020a3
commit
2d03d7fa53
@ -124,18 +124,14 @@ namespace AntDesign
|
||||
return;
|
||||
}
|
||||
|
||||
if (!item.IsSelected)
|
||||
{
|
||||
item.Select();
|
||||
|
||||
foreach (MenuItem menuitem in MenuItems.Where(x => x != item))
|
||||
{
|
||||
menuitem.Deselect();
|
||||
}
|
||||
|
||||
if (!item.IsSelected)
|
||||
{
|
||||
item.Select();
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Deselect();
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
|
Loading…
Reference in New Issue
Block a user