Skip to content

Commit

Permalink
chore: Directly check for busy indicator availability (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed May 31, 2024
1 parent 55b90f8 commit 6ad3a85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/page.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ page <- function(..., title = NULL, theme = bs_theme(), lang = NULL) {
lang = lang,
# Components require Bootstrap 5+
if (isTRUE(theme_version(theme) >= 5)) component_dependencies(),
if (is_installed("shiny", "1.8.1.9001")) shiny::useBusyIndicators()
use_busy_indicators()
),
theme = theme
)
}

use_busy_indicators <- function() {
# Use busy indicators were added in shiny 1.8.1.9001 (after 1.8.1.1)
ubi <- asNamespace("shiny")[["useBusyIndicators"]]
if (!is.null(ubi)) ubi()
}

#' @describeIn page A \pkg{bslib} wrapper for [shiny::fluidPage()], a fluid
#' Bootstrap-based page layout that extends to the full viewport width.
#' @inheritParams shiny::fluidPage
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.

0 comments on commit 6ad3a85

Please sign in to comment.