| glassSelectServer | R Documentation |
Use this with glassSelect(..., server = TRUE) when the choice set is
large. The browser sends search queries to Shiny and the server returns a
bounded list of matching choices.
glassSelectServer(
inputId,
choices,
session = shiny::getDefaultReactiveDomain(),
limit = 50L,
ignore_case = TRUE
)
inputId |
Input id used in |
choices |
Named or unnamed character vector of choices. |
session |
Shiny session. Defaults to the current reactive domain. |
limit |
Maximum number of matching choices returned per search.
Default |
ignore_case |
Logical. Match labels and values case-insensitively.
Default |
An observer created by shiny::observeEvent().
Other glass select widgets:
glassMultiSelect(),
glassMultiSelectServer(),
glassMultiSelectValue(),
glassSelect(),
glassSelectValue(),
updateGlassMultiSelect(),
updateGlassSelect()
if (interactive()) {
library(shiny)
choices <- stats::setNames(
sprintf("value-%04d", 1:1000),
sprintf("Choice %04d", 1:1000)
)
ui <- fluidPage(
useGlassTabs(),
glassSelect("pick", choices, server = TRUE)
)
server <- function(input, output, session) {
glassSelectServer("pick", choices, session = session)
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.