While rendering DT table in shiny, is there a way to add pop up icon as shown below. So when user clicks on it, it should show some message :)
datatable(iris) #### while rendering DT table
CodePudding user response:
Since you mention in your comment that you’d like the contents of the message to also be clickable, you might be interested in
CodePudding user response:
You can set the column names like this:
library(shiny)
library(DT)
ui <- fluidPage(
DTOutput("table")
)
server <- function(input, output, session) {
output$table <- renderDataTable(escape = FALSE, {
colnames(iris) <- c("Sepal Length", "Sepal Width", "Petal Length",
"Petal Width <div title ='Hover tooltip'>info</div>", "Species")
iris
})
}
shinyApp(ui, server)
However, things like shiny::icon("info-circle")
don't in the colnames.