Child Items do not render
Closed this issue · 1 comments
slynch401k commented
Changed the following to allow child items to render in SidebarComponent.razor
private void MenuItemClick(MenuItem menuItem)
{
if (!menuItem.IsActive)
{
if (!menuItem.HasChildMenuItems)
_navigationManager.NavigateTo(menuItem.Href);
}
if (menuItem.IsActive)
{
if (menuItem.HasChildMenuItems)
menuItem.IsOpened = !menuItem.IsOpened;
else if (_isCollapsed)
generalMenuItems.ForEach(x => x.IsOpened = false);
if (!menuItem.HasChildMenuItems)
_navigationManager.NavigateTo(menuItem.Href);
return;
}
generalMenuItems.ForEach(x => x.IsOpened = false);
menuItem.IsOpened = true;
if (!menuItem.HasChildMenuItems && menuItem.Href != null)
{
}
}
slynch401k commented
Closing changes made.