ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

constructing buttons via renderUI #9

Closed HermanSontrop closed 9 years ago

HermanSontrop commented 9 years ago

Hi,

is it possible to render a set of buttons via renderUI? In Shiny various inputs can be placed in a list which then can be passed in a single return to renderUI. Via this construction one can dynamically construct e.g. a large set of slider controls based on some data values.

With shinyBS the buttons indeed show up, however, they do no longer work properly. Is this correct? If so, is there an alternative way to dynamically generate shinyBS related buttons?

For instance, this doesn't work:

   output$Test <- renderUI({
     list(bsButton("btn1", label = "Left", value = "left"), 
         bsButton("btn2", label = "Middle", value = "middle"), 
         bsButton("btn3", label = "Right", value = "right")
    )
   })

kind regards, Herman