dreamRs / dreamRs/shinytreeview
Is there a way in which the menu can automatically collapse back once a country is selected?
- Dominant language
- R
- Stars
- 42
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hi @pvictor ,
Thank you so much for this package.
Is there a way in which the menu can automatically collapse back once a country is selected?
`
library(shiny)
library(shinytreeview)
data("cities")
ui <- fluidPage(
tags$h3("treeviewInput cities example"),
treeviewInput(
inputId = "tree",
label = "Choose a city:",
choices = make_tree(
cities, c("continent", "country", "city")
),
multiple = FALSE,
prevent_unselect = TRUE,
width = "100%"
),
verbatimTextOutput(outputId = "result")
)
server <- function(input, output, session) {
output$result <- renderPrint({
input$tree
})
}
if (interactive())
shinyApp(ui, server)
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the treeviewInput entry point and the cities example shown in the issue. Trace how a single country selection is handled and determine how the menu's expanded state is controlled. Done means selecting a country automatically collapses the menu in the provided Shiny example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100