I have a panel menu that I create in a loop. It produces the same panel menu multiple times with different Id's. When I hover over the panel items I can see that all of the URL's and related Id's are present, so it looks as if the panel has built correctly.
The issue is, that when I click on an item (e.g. Landlords/LandlordDashboard), I cannot use that item again (albeit with a different Id), until I click on another item (e.g. BillingPoints/AddBillingPoint) . I can then click on the first item and the navigation works.
In summary a page will not open, until I click on a different panel item, which opens a different page, I then go back and it will open the page once I click on the first item again.
The research I have done says that NavLink cannot have multiples of the same URL. I have tried using NavLink and get the same results.
e.g.
/SomePage/1
/SomePage/2
/SomePage/3
It sees the "SomePage" as the active page, and even though the Id is different, it will never navigate with a different Id. So the URL in browser changes, but the navigation doesn't fire, until you change the active page, by clicking on a different page.
I also started up a new Blazor app and tried with the same process with the same results.
I tried
NavgationManager.NavigateTo
and forced the navigation via the @mouseenter event, but it refreshes the whole application and resets the nav menu (collapse it). I have also tried using <a> with the same results.
So it appears I have two issues to solve.
1: Enabling, the same url with a different Id to be active, I assume this is changing the active page.
2: If I am to use forced navigation, I need to stop the whole application form refreshing.
Do you have any pointers on how either of these can be achieved using the PanelMenu?
It's weird, you can see the URL change in the browser but the page doesn't change.
For example,
This is the first link I click in the panel: https://localhost:44338/Dashboard/5f87cbae-0ec1-452d-42ef-08d934a0b89e
When I click on another link for Dashboard, it changes in the browser (url window), but doesn't change the page. Second link: https://localhost:44338/Dashboard/de40b8ec-0f1b-4956-d1b0-08d934cbf567
The life cycle of the parent page is picking up the change in parameter, but nothing happens.
I read some stuff on stack overflow, but it doesn't make sense to me. I'll ask a question on there and put the answer on here if I get one.
In MainLayout I added OnParametersSet to see if it is picking up the change in Id. In both MainLayout and the Dashboard, the OnParametersSet is being hit each time I try to Navigate and I can see the Id parameter changing it's value. Everything appears to be doing what its supposed, but the page doesn't update it self with new values for that Id.
As you say, it would appear the navigation is happening, but the data isn't changing.
In my DashboardPage the three elements I am loading are as follows: