ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

addTooltip doesn't show up in conditional statement on the server side #105

Open Northbreeze opened 5 years ago

Northbreeze commented 5 years ago

I have three filters in my shiny app. Based on the selection of the filter 1, I want to show two different tooltips. If the user chooses A, I want to show message 1, if the user is choosing B, I want to show message 2. I have to use addTooltip on the server side to make sure I can grab the input value from the user but the tooltip doesn't show up.

   observeEvent(input$group,{
    ifelse(filtered_data()$selection1=="A",addTooltip(session, "id", "message 1", placement = "bottom", trigger = "hover", options = NULL),
         addTooltip(session, "id", "message 2", placement = "bottom", trigger = "hover", options = NULL))
  }
  )