I am working on implementing shinyWidgets dropdown menus into my program because A: they look great B: they are easy to make.
The problem that I can't solve, is how to make the tooltip message disappear once the dropdownmenu is open.
the source code for the widget button is the following:
# tooltip
if (identical(tooltip, TRUE))
tooltip <- tooltipOptions(title = label)
if (!is.null(tooltip) && !identical(tooltip, FALSE)) {
tooltip <- lapply(tooltip, function(x) {
if (identical(x, TRUE))
"true"
else if (identical(x, FALSE))
"false"
else x
})
tooltipJs <- htmltools::tags$script(
sprintf(
"$('#%s').tooltip({ placement: '%s', title: '%s', html: %s, trigger: 'hover' });",
inputId, tooltip$placement, tooltip$title, tooltip$html
)
)
} else {
tooltipJs <- ""
}
I tried a solution to set the delay to 0, but it doesn't work.
tooltip: { hideDelay: 0}
Any one a clue how to make the popup disappear when modaldialog of the widget is open?
library("shiny")
library("shinyWidgets")
shinyApp(
ui = fluidPage(
tags$head(tags$style('#dropdown-menu-MyDDM {left: 100px;}
tooltip: {
hideDelay: 0
}')),
dropdownButton(label = "CLICK",
h5("HELLO"),
icon = icon("gear"),
# right = T,
inputId = "MyDDM",
circle = T, status = "info", size = "sm",
tooltip = tooltipOptions(title = "Click to change plot"), width = "600px")
),
server = function(input, output, session) {
}
)