Open MHaringa opened 1 year ago
Thanks for awesome package. It appears that multiple_radio() returns NULL in case only one choice is defined as argument. See the example below. I would expect that multiple_radio() returns "A" in the following example:
multiple_radio()
NULL
"A"
# Checkbox library(shiny) library(shiny.semantic) ui <- function() { shinyUI( semanticPage( h1("Radioboxes"), multiple_radio("radioboxes", "Select Letter", LETTERS[1], selected = "A"), p("Selected letter:"), textOutput("selected_letter") ) ) } server <- shinyServer(function(input, output) { output$selected_letter <- renderText( input$radioboxes ) }) shinyApp(ui = ui(), server = server)
A possible work around is the following, however multiple_radio() returning "A" instead of NULL seems more obvious to me.
server <- shinyServer(function(input, output) { output$selected_letter <- renderText( ifelse(is.null( input$radioboxes ), "A", input$radioboxes)) })
+1
Thanks for awesome package. It appears that
multiple_radio()
returnsNULL
in case only one choice is defined as argument. See the example below. I would expect thatmultiple_radio()
returns"A"
in the following example:A possible work around is the following, however
multiple_radio()
returning"A"
instead ofNULL
seems more obvious to me.