Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

New-PodeWebTable -ClickScriptBlock never triggers

Open ml222 opened this issue 1 year ago • 0 comments

Describe the Bug

When using New-PodeWebTable and specifying a ClickScriptBlock (and DataColumn), the code in the ClickScriptBlock is never triggered when clicking a table row.

Steps To Reproduce

New-PodeWebTable -Name 'Services' -Datacolumn Name -ClickScriptBlock { Write-Host "Click" Show-PodeWebToast -Message "$($WebEvent.Data.Value)" } -ScriptBlock { foreach ($svc in (Get-Service)) { [ordered]@{ Name = $svc.Name Status = "$($svc.Status)" } } }

Expected Behavior

"Click" should appear in the Powershell console and WebToast should appear on web page when a table row is clicked.

Platform

  • OS: Windows
  • Browser: Edge
  • Versions:
    • Pode: 2.10.1
    • Pode.Web: 1.0.0
    • PowerShell: 5.1

Additional Context

Worked fine in 0.83

ml222 avatar Sep 01 '24 21:09 ml222