-
There seems to be a problem with some external Javascript libraries. In the example below, I get browser console error messages complaining about shinyBS.css and shinyBS.js. I know that shinyBS is no longer maintained, and the author is unresponsive, but it still works with standard Shiny apps. When I uncomment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
A workaround for packages that fail to add the correct resource path. The example is for
No more warnings |
Beta Was this translation helpful? Give feedback.
-
One of my colleagues faced similar problems. This is my answer to his questions - perhaps it can be useful here too. There are two issues with shinyBS; see below for explanations and workarounds which can be used in Rhino. Resource path setupshinyBS uses the Workaround: Add the following snippet to your # Run the `.onAttach` hook (shinyBS uses it to add a Shiny resource path).
suppressWarnings(library(shinyBS)) You'll still need to explicitly IDs in Shiny modulesshinyBS doesn't automatically apply Workaround: Apply #' @export
ui <- function(id) {
ns <- NS(id)
bootstrapPage(
bsAlert(ns("alert"))
)
}
#' @export
server <- function(id) {
moduleServer(id, function(input, output, session) {
createAlert(
session = session,
anchorId = session$ns("alert"),
title = "Title",
content = "Content."
)
})
} |
Beta Was this translation helpful? Give feedback.
A workaround for packages that fail to add the correct resource path. The example is for
shinyBS
library(shinyBS)
; don't care about themodule may cause issues
warningprint(resourcePaths())
afterlibrary shinyBS
No more warnings