Well, converting your $EventData
to JSON works for the UDToast - but for whatever reason, something with the -OnChange
trigger is causing this. You could also access the Value
with $EventData.Value
, predictably.
New-UDAutocomplete -Label 'Select' -Options $STCompOptions -OnChange {
Show-UDToast (ConvertTo-Json $EventData) -Duration 100000
} -FullWidth