By default shiny does not render outputs that are hidden, for
example inside an inactive tab or a collapsed card
(suspendWhenHidden = TRUE). render_hidden_output() turns
this off for one output, so the output renders at the next flush even
when hidden. With once = TRUE, the option is restored after that
flush.
Usage
render_hidden_output(
outputId,
session = shiny::getDefaultReactiveDomain(),
once = TRUE
)Value
A function (invisible) that restores the option; calling it more than once has no further effect. Nothing is changed when the output already renders while hidden.
Examples
if (FALSE) { # \dontrun{
# inside a shidashi module server function:
register_output(renderPlot({ plot(1:10) }), outputId = "my_plot")
# render `my_plot` once, even while its tab is not shown
render_hidden_output("my_plot")
} # }