ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

bsTooltip not working (i.e. no hover tooltip shown) when referencing ID of UI module #127

Closed latlio closed 4 years ago

latlio commented 4 years ago

Here's a reprex

alphaUI <- function(id, label = NULL) {
   ns <- NS(id)
   textInput(ns("alpha"), NULL)
}

ui <- fluidPage(
   alphaUI("alpha")
   shinyBS::bsTooltip("alpha", "text", placement = "right", trigger = "hover")
)

server <- function(input, output, session) {}

shinyApp(ui, server)
latlio commented 4 years ago

Figured it out! The solution is to pass ns("alpha") in bsTooltip