Radio Button - Default Selection

This might be a bug so I’m happy to raise it on github if necessary but I just wanted to make sure I wasn’t missing anything first.

When I create a set of radio buttons with ‘New-UDRadio’, if I want to have the first radio button selected by default I would expect to add the ‘-checked’ switch to the first radio button however if I use this then when selecting other radio buttons on the dashboard it defaults back to the first radio button every time another button is clicked. If I click the button twice, it is then selected.

Here’s an example:

New-UDHeading -Text “This works but does not have a default selection” -size 6
New-UDRadio -id ‘1’ -Label “Option1” -Group “Group1”
New-UDRadio -id ‘2’ -Label “Option2” -Group “Group1”
New-UDRadio -id ‘3’ -Label “Option3” -Group “Group1”
New-UDHeading -Text “This has a default selection but does not work” -size 6
New-UDRadio -id ‘1’ -Label “Option1” -Group “Group2” -Checked
New-UDRadio -id ‘2’ -Label “Option2” -Group “Group2”
New-UDRadio -id ‘3’ -Label “Option3” -Group “Group2”

Thanks,
Tom.

For what it’s worth, I’m having this same issue. No resolution that I’ve found yet, but I think this might be the cause deeper in UD’s code: https://stackoverflow.com/questions/48423061/radio-buttons-need-to-click-twice-to-reflect-change

I’m not sure if this is relevant for @adam or not, but perhaps it could offer a resolution.

Just came across this issue when creating a default checkbox, never needed to before.
Checked in the latest universal nightly and it still appears to be present.
I’ve logged the issue here: https://github.com/ironmansoftware/powershell-universal/issues/16