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.