Shiny Combo Box

i would like to create shiny tree via replicating the below example.

but i failed.

how about the package shinyTree ?

I tried shinytree and shinytreeview .... however it expands if you have a long list. That is why I am looking for a combo box similar to the example.

you could raise a feature request as an issue on shinytree github.
you could also fork it and change the behaviour to suit your needs.
Besides that your request is very vague. What specifically do you want forum users to do for you ?

I tried to replicate the example but I failed to run it successfully. I requested a new feature from shiny widgets and they replied sorry cos of time and resources. Please advice

"failed to run it" is almost meaningless information if you are looking for help to not fail.
If you have code with a simple syntax issue or something small to tweak , we could attempt to help. You would necessarily have to share it.

On the other hand I don't have the time to develop functionality for you from scratch as though I was your software developer.

I do not like your way of replying "I was your software developer".

I said i tried to follow what was mentioned in the example and it was not working properly.

library(shiny)

js <- HTML("
$(function() {
  var selection = setInterval(function() {
    if($('.comboTreeDropDownContainer').is(':visible')) {
      var selItem = comboTree1.getSelectedItemsTitle();
      Shiny.onInputChange('selTitle', selItem)
    }
  }, 500);
});
")

ui <- {fluidPage(
    tags$head(
      tags$script(src = "comboTreePlugin.js"), 
      tags$script(src = "icontains.js"), 
      tags$script(js),
      tags$link(rel = "stylesheet", type = "text/css", href = "comboTreeStyle.css")
    ),
    includeScript("www/myData.json"),
    sidebarLayout(
      sidebarPanel(width = 3,
                   tags$input(type = "text", id = "example", placeholder = "Select"), 
                   uiOutput("comboTreeMenu"),
                   verbatimTextOutput("selected")
      ), 
      mainPanel(width = 9)
    )
)}

server <- function(input, output, session){
  output$comboTreeMenu <- renderUI({
    includeScript("www/example.js")
  })

  output$selected <- renderPrint({
    req(input$selTitle)
    print(input$selTitle)
  })
}

shinyApp(ui, server)

I got it, I need to put all files under /www folder.
Thanks

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.