ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

sticky popover? #69

Open ignacio82 opened 8 years ago

ignacio82 commented 8 years ago

Is there a way to have a sticky popover so people have a couple of second to click on a link before the popover goes away? For example:

## app.R ##
library(shiny)
library(shinydashboard)
library(shinyBS)
# Header
header <- dashboardHeader()
# Sidebar
sidebar <- dashboardSidebar(fileInput("chosenfile", label = h4("File input"), 
                                      accept = ".csv"), 
                            bsPopover(id = "chosenfile", title = "Tidy data",
                                      content = paste0("You should read the ", 
                                                       a("tidy data paper", 
                                                         href = "http://vita.had.co.nz/papers/tidy-data.pdf")),
                                      placement = "right", options = list(container = "body")))
# Body
body <- dashboardBody()
# ui
ui <- dashboardPage(header, sidebar, body)
# server
server <- function(input, output) {
}
# run
shinyApp(ui, server)
jonkatz2 commented 8 years ago

I've done this by setting trigger = "hover click". If your link opens in a modal you might have to juggle some z-index values.