This category is reserved for questions related to PowerShell Universal 2.9. If you want post a question for PowerShell Universal Dashboard within PowerShell Universal, please use the PowerShell Universal \ Universal Dashboard category. I’m using the Selection example to base something off. The documentation is available here: https://docs.ironmansoftware.com/dashboard/components/data-display/table#selection
However although the table has checkboxes, touble-clicking on the table and / or clicking the button does not result in any activity. I assume I’m missing something.
Would someone mind taking a look for me please? Code is below.
$Columns = @(
New-UDTableColumn -Property ServerName -Title "Server Name" -ShowSort -IncludeInExport -IncludeInSearch -ShowFilter -FilterType text
New-UDTableColumn -Property BadRules -Title "Bad Rules" -ShowSort -DefaultSortColumn -IncludeInExport -IncludeInSearch -ShowFilter -FilterType select
New-UDTableColumn -Property RuleCount -Title "Rule Count" -IncludeInExport -ShowFilter -FilterType select
)
# New-UDTable -Id 'firewall_table' -Title "Firewall Rules" -Data $ReportOutput -Columns $Columns -ShowSelection -Dense -ShowSearch -OnRowSelection {
New-UDTable -Id 'firewall_table' -Data $ReportOutput -Columns $Columns -Title 'Rules' -ShowSearch -ShowPagination -ShowSelection -Dense -OnRowSelection {
$Item = $EventData
Show-UDToast -Message "$($Item | out-string)"
}
New-UDButton -Text "GET Rows" -OnClick {
$value = Get-UDElement -Id "firewall_table"
Show-UDToast -Message "$( $value.selectedRows | Out-String )"
}