Closed msgoussi closed 4 years ago
library(shiny) library(shinytreeview) library(shinyWidgets) library(dplyr)
x <- mutate(cities, all = "All")
ui <- fluidPage( tags$h3("treeviewInput cities example"),
dropdownButton(circle = FALSE, label = "Show Tree", treecheckInput( inputId = "tree", label = NULL,
selected = "All", choices = make_tree( x, c("all", "continent", "country", "city") ), borders = FALSE, width = "100%"
) ) , verbatimTextOutput(outputId = "result") )
server <- function(input, output, session) { output$result <- renderPrint({ input$tree }) }
if (interactive()) shinyApp(ui, server)
Hello, Thanks for reporting, it works now.
Victor
library(shiny) library(shinytreeview) library(shinyWidgets) library(dplyr)
x <- mutate(cities, all = "All")
ui <- fluidPage( tags$h3("treeviewInput cities example"),
convert to combo box list
dropdownButton(circle = FALSE, label = "Show Tree", treecheckInput( inputId = "tree", label = NULL,
is not selecting all levels below it
) ) , verbatimTextOutput(outputId = "result") )
server <- function(input, output, session) { output$result <- renderPrint({ input$tree }) }
if (interactive()) shinyApp(ui, server)