Product: PowerShell Universal
Version: 5.016
Is this possible without using an Invoke-UDRedirect?
I have a table with custom columns like below. For some reason using Onclick with Invoke-UDRedirect seems to use the wrong eventdata on occasion (from another object). Button href works fine, except of course it opens in the same window.
Href is faster and works on mobile so it is preferred anyway for a simple URL button.
Working using href
New-UDTableColumn -Property 'Ticket' -Render {
New-UDButton -Id "btn$($EventData.Ticket)" -Href "https://url/ticket?id=$($EventData.Ticket)&entry=$($EventData.Entry)" -Text ($EventData.Ticket)
}
Not working consistently with onclick + redirect
New-UDTableColumn -Property 'Ticket' -Render {
New-UDButton -Id "btn$($EventData.Ticket)" -OnClick { Invoke-UDRedirect "https://url/ticket?id=$($EventData.Ticket)&entry=$($EventData.Entry)" -OpenInNewWindow } -Text ($EventData.Ticket)
}