shinyhelper icon indicating copy to clipboard operation
shinyhelper copied to clipboard

helper does not display when a UI element has the id "bootstrap"

Open ifellows opened this issue 11 months ago • 0 comments

I love the package and use it often in production. I just ran into a tricky bug when starting to integrate the help system into an existing application. I had a tableOutput that displayed the results from a bootstrap resampling process. I gave it the outputId of "bootstrap". Apparently any element with the id "bootstrap" will cause shinyhelper to not trigger the display of the modal dialogs. I assume this is due to a name clash.

Here is a repro where changing "bootstrap" to "bootstrap1" fixes the issue:

library(shiny)
library(shinyhelper)
library(magrittr)

ui <- fluidPage(
  tagList(
    selectInput("var", "y", choices = c("a","b")) %>%
      helper(type = "inline", title = "Foo bar",
             content = c("Hello world")),
    numericInput( "bootstrap", "x", value = 10, min = 1)
))
server <- function(input, output, session) {
  observe_helpers()
}
shinyApp(ui, server)

ifellows avatar Mar 20 '24 19:03 ifellows