inst/essais/essai00.R

library(shiny)
library(cascadeSelect)

ui <- fluidPage(
  titlePanel("Cascade Select"),
  fluidRow(
    column(
      6,
      cascadeSelectInput(
        "textInput",
        choices = countries,
        placeholder = "Select a city",
        optionLabel = "cname",
        optionGroupLabel = "name",
        optionGroupChildren = list("states", "cities")
      ),
      br(),br(),
      textOutput("textOutput")
    )
  )
)

server <- function(input, output, session) {
  output$textOutput <- renderText({
    sprintf("You entered: %s", input$textInput)
  })

  observe(print(input$textInput))
}

shinyApp(ui, server)

Try the cascadeSelect package in your browser

Any scripts or data that you put into this service are public.

cascadeSelect documentation built on July 9, 2023, 6:50 p.m.