Navigation group only opens after reload when its first child is the current page (2026.3.4)
Hi support,
Environment: Version: PowerShell Universal 2026.3.4, linux container in kubernetes.
In an app with a permanent navigation, a New-UDListItem with -Children starts open after a page reload only when the current page is its first child. When another child page is current, the group starts closed and the current page is not visible.
Steps: New-UDApp -NavigationLayout Permanent with New-UDListItem -Label 'Charts' -Children { New-UDListItem -Label 'A' -Href '/a'; New-UDListItem -Label 'B' -Href '/b' } and pages /a and /b. Open /b and reload.
Expected: group 'Charts' open, as after reloading /a.
Actual: closed.
Probable cause in the client bundle: the function that checks whether a group contains the current location loops over the children but compares the location with e[0].href in every iteration instead of e[n].href.
Thanks
René
Hi René,
Thank you for the clear report and for pointing at the exact spot in the client.
You are right, and I reproduced it in our lab with your example on 2026.3.4. In that version, the function that decides whether a navigation group starts open loops over the group's children but compares the current page with the first child's Href on every pass. A group therefore starts open after a reload only when its first child is the current page, which is exactly what you see with /a and /b. The same line is unchanged in our current code, so I am passing your report to our QA and development team and will let you know what comes of it.
Until it is fixed, you can add the -Open switch to the group's New-UDListItem (the 'Charts' item in your example). I tested it with your example, and the group then starts open after every reload, so the current page is visible. The trade-off is that it also starts open on pages outside the group, and your users can still close it with a click. The switch is listed in the syntax of https://docs.devolutions.net/powershell-universal/cmdlets/New-UDListItem/
Best regards,
Michel
Michel Audi