In something similar to the below example, the set-UDElement on the button is working on both properties, but the Set-UDElement for Prop1 on the UDAlert will update the severity, but not the text. Anyone else able to recreate? Or is it just me?
Also, am I correct in having to reference some unique value in each row over again if I want to be able to sign that as the id of an element? It’s otherwise referencing the correct element, as the severity is changing, but the text is not.
New-UDTableColumn -Property Prop1 -Title "Prop 1" -Render {
$RowKey = "$($EvenData.UniqueVariable)"
New-UDAlert -Id $RowKey -Severity 'warning' -Text 'Warning'
}
New-UDTableColumn -Property Prop2 -Title "Prop 2" -Render {
$RowKey = "$($EvenData.UniqueVariable)"
New-UDButton -Text 'Do the thing' -Id "Button-$RowKey" -OnClick {
Invoke-TheThing
Set-UDElement -Id "Button-$RowKey" -Properties @{
Text = 'Processed'
Disabled = $true
}
Set-UDElement -Id "Prop1-$RowKey" -Properties @{
Text = 'Thing Done'
Severity = 'info'
}
}
}
Product: PowerShell Universal
Version: 3.9.2