When I create a panel menu in a loop, the link does not open the page, even though it shows a change in the URL bar. It is as if the navigation only fires once.
The code in this instance creates to three parent item in the panel menu, with a link to the landlord in each item.
When the menu is first loaded, I can click on a link(panel menu item) and it will navigate to the page. However, when I then click on another item, it will not navigate. If I refresh the page, I can then click on another link. The url will change in the address bar, but the page will not change. I can also see that the links all have the relevant Id's when I hover over them.
In summary, it appears that everything is there, but the navigation will only happen once, its as if it is seeing it as the same link, so wont navigate, even thought the loop is generating separate items.
Additionally, this is in the NavMenu.razor code which is called in the MainLayout page and is inside a Radzen sidebar.
The expected outcome is that the navigation will happen on each link when it is clicked.
<RadzenPanelMenu>
@if (landlords != null)
{
@foreach (var url in landlords)
{
<RadzenPanelMenuItem Expanded="false" Text="@url.LandlordName" Icon="account_circle">
<RadzenPanelMenuItem Text="Dashboard" Path=@($"/Landlords/LandlordDashboard/{ url.Id }") Icon="dashboard" />
</RadzenPanelMenuItem>
}
}
</RadzenPanelMenu>