Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-PodeWebTable -ClickScriptBlock never triggers #612

Open
ml222 opened this issue Sep 1, 2024 · 0 comments
Open

New-PodeWebTable -ClickScriptBlock never triggers #612

ml222 opened this issue Sep 1, 2024 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@ml222
Copy link

ml222 commented Sep 1, 2024

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 ml222 added the bug 🐛 Something isn't working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant