New-UDSelectOption -Selected not working

Product: PowerShell Universal
Version: 1.5.21

Hello,
I get errror by adding -Selected to New-UDSelectOption

New-UDSelect -Id “select” -Label “Company” -Option {
New-UDSelectOption -Name “A” -Value “A”
New-UDSelectOption -Name “B” -Value “B” -Selected
New-UDSelectOption -Name “C” -Value “C”
}

Error:
Exception when calling “Invoke” with 0 argument (s): "No parameter was found that corresponds to the parameter name “Selected”.

Any help appriciated.

You will want to use -DefaultValue on the New-UDSelect:
New-UDSelect -Id “select” -Label “Company” -Option {
New-UDSelectOption -Name “A” -Value “A”
New-UDSelectOption -Name “B” -Value “B”
New-UDSelectOption -Name “C” -Value “C”
} -DefaultValue “B”

Thank you very much. It works!