New-UDListItem "sticky" open

Product: PowerShell Universal
Version: 3.7.13

I know I can use the -Open parameter to make the menu always open, but it doesn’t seem to be an option for the menu to be open if the page is active.

For instance, if I have a navigation menu…

New-UDListItem -Label 'Some Label' -Children {
    New-UDListItem -Label 'Page 1' -Href '/page1'
    New-UDListItem -Label 'Page 2' -Href '/page2'
} -Open

If I’m on Page 1 the entry in the menu is highlighted. However, without the -Open parameter the menu is collapsed, even though it “knows” I’m on a page in that menu.

Is there anyway to have the menu be open automatically if I’ve landed on a page in the sub-menu?

We have to do some react stuff to make it highlight the menu item of the current page. I’ve opened an issue for this so we can make sure the menu is expanded as well. There isn’t a work around I can think of.

I tried using the $Header to figure out the URI and dynamically set the -Open, but not all headers seem to be available to the -LoadNavigation for New-UDDashboard.