ironmansoftware / issues

Public Issue tracker for Ironman Software products.
https://ironmansoftware.com
31 stars 2 forks source link

Query parameters are not updated when Invoke-udredirect is used #3405

Closed gshykhov closed 2 weeks ago

gshykhov commented 2 weeks ago

Version

4.2.21

Severity

Medium

Environment

msi

Steps to Reproduce

While I try redirecting to a page with query parameters, it is not working. The redirect is working, but the query parameters are not working; stays the same since the page was refreshed.

The same happens with Navigation.

Here is a code for the app to reproduce the issue:

$Navigation = @(
    New-UDListItem -Label "Home" -Href "/?Id=123"
)

New-UDApp -Title 'PowerShell Universal' -Content {
    New-UDTypography -Text 'Home' -Id 'homeText'

    Show-UDToast $Query.id
    New-UDButton -Text Test -OnClick {
        Invoke-UDRedirect -Url "/home?id=$(Get-Random -Minimum 1 -Maximum 21)"
    }
} -Navigation $Navigation -HideUserName

Expected behavior

$Query hash table is updated with the query parameters

Actual behavior

$Query hash table is not updated with the query parameters

Additional Environment data

OS: Windows Server 2022 Standard

Screenshots/Animations

psu_qu_issue

gshykhov commented 2 weeks ago

Forum topic: https://forums.ironmansoftware.com/t/query-parameters-are-not-updated-when-redirect-is-used/10852/1