shiny.fluent
shiny.fluent copied to clipboard
Fix multiselect in ComboBox
Changes
Closes #160
How to test
library(shiny)
library(shiny.fluent)
shinyApp(
ui = fluentPage(
ComboBox.shinyInput(
inputId = "multiselect",
multiSelect = TRUE,
options = list(
list(key = "A", text = "A"),
list(key = "B", text = "B"),
list(key = "C", text = "C")
)
),
ComboBox.shinyInput(
inputId = "singleselect",
multiSelect = FALSE,
options = list(
list(key = "A", text = "A"),
list(key = "B", text = "B"),
list(key = "C", text = "C")
)
)
),
server = function(input, output, session) {
}
)
Additional test app to also test Dropdown
library(shiny)
library(shiny.fluent)
options <- list(
list(key = "A", text = "Option A"),
list(key = "B", text = "Option B"),
list(key = "C", text = "Option C")
)
ui <- function(id) {
ns <- NS(id)
div(
ComboBox.shinyInput(
ns("combo"),
options = options,
multiSelect = TRUE,
value = "A"
),
textOutput(ns("comboValue")),
Dropdown.shinyInput(
ns("dropdown"),
value = "A",
options = options,
multiSelect = TRUE
),
textOutput(ns("dropdownValue"))
)
}
server <- function(id) {
moduleServer(id, function(input, output, session) {
output$comboValue <- renderText({
dput(input$combo)
})
output$dropdownValue <- renderText({
input$dropdown
})
})
}
Still seeing the issue from #160? Wondering if this has been paused?
@jakubsob Can you replicate this bug? Where it takes the "Option A" as the key starts with "A"
inst/examples/ComboBox.R