The default selection for the radioButtons with ID input$seats_ballots is "Seats". When the checkboxInput with ID input$percentage is triggered, an observeEvent changes the choices argument using updateRadioButtons. When 'updateRadioButtons is invoked, it resets the selection to the default "Seats".
The desired behaviour is keep the selected radio button when the checkbox is triggered. This will likely require saving the state of the selected radio button as a reactive.
The default selection for the
radioButtons
with IDinput$seats_ballots
is "Seats". When thecheckboxInput
with IDinput$percentage
is triggered, anobserveEvent
changes thechoices
argument usingupdateRadioButtons
. When'updateRadioButtons
is invoked, it resets the selection to the default "Seats".The desired behaviour is keep the selected radio button when the checkbox is triggered. This will likely require saving the state of the selected radio button as a reactive.