dreamRs / shinytreeview

Hierarchical tree input for Shiny apps
GNU General Public License v3.0
41 stars 8 forks source link

hierarchical argument with default selected is not working #1

Closed msgoussi closed 4 years ago

msgoussi commented 4 years ago

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

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)

pvictor commented 4 years ago

Hello, Thanks for reporting, it works now.

Victor