ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

ShinyBS BSPopover not working with shinyWidgets inputs #97

Closed dylancis closed 6 years ago

dylancis commented 6 years ago

The shynyBS::BSPopover does not get display with shinyWidgets inputs even if those do have an inputId argument. Reproducible example below:

library(shiny)
library(shinyBS)
library(shinyWidgets)

ui <- fluidPage(
  titlePanel("Hello Shiny!"),
  sidebarLayout(
    sidebarPanel(
      shinyWidgets::materialSwitch(inputId = "testBS", label = "Test BS"),
      # this one get never displayed...
      bsPopover(id = "testBS", title = "test", content =  "Not displaying..."),
      # Input: Slider for the number of bins ----
      sliderInput(inputId = "bins",
                  label = "Number of bins:",
                  min = 1,
                  max = 50,
                  value = 30),
     # this one works just fine
    bsPopover(id = "bins", title = "bins", content =  "this one is okay!")
    ),
    mainPanel(
      plotOutput(outputId = "distPlot")
    )
  )
)

server <- function(input, output) {
  output$distPlot <- renderPlot({
    x    <- faithful$waiting
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    hist(x, breaks = bins, col = "#75AADB", border = "white",
         xlab = "Waiting time to next eruption (in mins)",
         main = "Histogram of waiting times")
  })
}

shinyApp(ui, server)

Any idea how to make shinyBS tooltip working with shinyWidgets please?

dylancis commented 6 years ago

fixed in: https://github.com/dreamRs/shinyWidgets/issues/63