update_tooltips {shinyfilter} | R Documentation |
Update the tooltips/popovers based on the currently available filter options
Description
Updates all tooltips or popovers for shinyfilter
filter
selectizeInput
widgets. Tooltips/popovers can be used to show the
currently unavailable filter options, i.e. the filter options that are not
available at the moment because of the dataframe presented in the
reactable
is filtered by the choices made in the other filters. It
is also possible to list the available filter options as well.
If you want to use tooltips/popovers, you need to call
use_tooltips()
from within the UI definition of your shiny
app.
Usage
update_tooltips(
react_id,
session,
tooltip = TRUE,
show_avail = TRUE,
title_avail = "Available values:",
title_nonavail = "Currently not available filters:",
popover_title = "Filter options",
max_avail = NULL,
max_nonavail = max_avail,
more_avail = "... (# more)",
more_nonavail = "... (# more)",
placement = "top"
)
Arguments
react_id |
The output variable/ID of the |
session |
The session variable provided as an argument to the server function. |
tooltip |
If |
show_avail |
If |
title_avail |
Header text for the list of available filter options. |
title_nonavail |
Header text for the list of unavailable filter options. |
popover_title |
Title text for the popover window. Only relevant when
|
max_avail |
Maximum number of available filter options shown. Use the
|
max_nonavail |
Maximum number of non-available filter options shown. Use
the |
more_avail |
Text to be shown if |
more_nonavail |
Text to be shown if the number of available filter
options exceeds |
placement |
Defines where the tooltip/popover is placed relative to the
filter (i.e. |
Details
For a full example of a shiny app using shinyfilter
please
call up the help for update_filters()
. See the
README.md
file or the GitHub repo on
https://github.com/jsugarelli/shinyfilter
for a comprehensive shinyfilter
tutorial.
Tip: If your tooltips/popovers do not show up, attach the
shinyBS
package directly in your Shiny app by adding
library(shinyBS)
to your code. The shinyBS
package is used to
create the tooltips and popovers.
Value
No return value.