Appsilon / shiny.semantic

Shiny support for powerful Fomantic UI library.
http://appsilon.github.io/shiny.semantic
Other
499 stars 97 forks source link

Bug: 'update_multiple_checkbox' not supporting choices with single quote #383

Open u9090 opened 3 years ago

u9090 commented 3 years ago

Using the following example, the first box is not checked although it is mentioned in the selected param (maybe due to JSON conversion???)

if (interactive()) {
    library(shiny)
    library(shiny.semantic)

    ui <- function() {
        shinyUI(
            semanticPage(
                title = "Checkbox example",
                multiple_checkbox(input_id="checkboxes", label=NULL, choices="")
            )
        )
    }

    server <- shinyServer(function(session, input, output) {
        update_multiple_checkbox(session,
                                input_id  = "checkboxes",
                                choices  = c("A's", "B"),
                                selected = c("A's", "B"))
    })

    shinyApp(ui = ui(), server = server)
}