Skip to content

Commit f55c26a

Browse files
authored
docs: Link to outputOptions() from render functions (#4196)
* docs(downloadHandler): Link to `outputOptions()` * docs: include `outputOptions()` in other render functions
1 parent 9fbb2c5 commit f55c26a

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

R/shinywrappers.R

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,10 @@ markOutputAttrs <- function(renderFunc, snapshotExclude = NULL,
383383
#' The corresponding HTML output tag should be `div` or `img` and have
384384
#' the CSS class name `shiny-image-output`.
385385
#'
386-
#' @seealso For more details on how the images are generated, and how to control
386+
#' @seealso
387+
#' * For more details on how the images are generated, and how to control
387388
#' the output, see [plotPNG()].
389+
#' * Use [outputOptions()] to set general output options for an image output.
388390
#'
389391
#' @param expr An expression that returns a list.
390392
#' @inheritParams renderUI
@@ -598,6 +600,7 @@ isTemp <- function(path, tempDir = tempdir(), mustExist) {
598600
#' used in an interactive RMarkdown document.
599601
#'
600602
#' @example res/text-example.R
603+
#' @seealso [outputOptions()]
601604
#' @export
602605
renderPrint <- function(expr, env = parent.frame(), quoted = FALSE,
603606
width = getOption('width'), outputArgs=list())
@@ -719,7 +722,7 @@ renderText <- function(expr, env = parent.frame(), quoted = FALSE,
719722
#' call to [uiOutput()] when `renderUI` is used in an
720723
#' interactive R Markdown document.
721724
#'
722-
#' @seealso [uiOutput()]
725+
#' @seealso [uiOutput()], [outputOptions()]
723726
#' @export
724727
#' @examples
725728
#' ## Only run examples in interactive R sessions
@@ -809,6 +812,13 @@ renderUI <- function(expr, env = parent.frame(), quoted = FALSE,
809812
#'
810813
#' shinyApp(ui, server)
811814
#' }
815+
#'
816+
#' @seealso
817+
#' * The download handler, like other outputs, is suspended (disabled) by
818+
#' default for download buttons and links that are hidden. Use
819+
#' [outputOptions()] to control this behavior, e.g. to set
820+
#' `suspendWhenHidden = FALSE` if the download is initiated by
821+
#' programmatically clicking on the download button using JavaScript.
812822
#' @export
813823
downloadHandler <- function(filename, content, contentType=NULL, outputArgs=list()) {
814824
renderFunc <- function(shinysession, name, ...) {

man/downloadHandler.Rd

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/renderImage.Rd

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/renderPrint.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/renderUI.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)