Closed HauklandJ closed 1 month ago
~Related: the preview is stuck spinning when setting "Forhåndsvalgt radioknapp" to 1, even when there are 2 radio buttons.~ Nevermind, i was on frontend v3, this does not apply to v4.
https://github.com/Altinn/altinn-studio/assets/148075168/3c487c97-61e1-4fbd-ab34-8f3be45d9656
Setting, changing, and then removing preselectedOptionIndex now works as expected! Tested OK in dev.
Description of the bug
If you set a default chosen radio button and then regret it, you need to know a workaround in order to get rid of the error that occurs.
Steps To Reproduce
Add a radio button with two or more options
Set "Forhåndsvalgt radioknapp" to e.g. 0
Remove the value from "Forhåndsvalgt radioknapp"
You will now get an error, and see the following in the preview
WORKAROUND: set the value to -1.
Additional Information
No response