即使在 activity 完成后,shinycssloaders 仍会继续加载
shinycssloader keeps loading even after activity is finished
tabPanel("Call Tab",
wellPanel(style = "background: white",
wellPanel(style = "background: #ff6666",
h4("Case1:EWS&0Count"),
h5("Check")
),
formattableOutput("case1.Table") %>% withSpinner()
),
即使在生成 table 输出后,shinycssloaders 包的 withSpinner 仍继续加载。
您需要在输出名称中删除点("case1Table"
而不是 "case1.Table"
)
请看以下内容:
library(shiny)
library(formattable)
ui <- fluidPage(
titlePanel("formattableOutput withSpinner"),
sidebarLayout(sidebarPanel(),
mainPanel(tabsetPanel(
tabPanel(
"Call Tab",
wellPanel(
style = "background: white",
wellPanel(style = "background: #ff6666",
h4("Case1:EWS&0Count"),
h5("Check")),
withSpinner({formattableOutput("case1Table")})
)
)
)))
)
server <- function(input, output) {
output$case1Table <- renderFormattable({
formattable(data.frame(replicate(10, runif(10, 0, 10))))
})
}
shinyApp(ui = ui, server = server)
tabPanel("Call Tab",
wellPanel(style = "background: white",
wellPanel(style = "background: #ff6666",
h4("Case1:EWS&0Count"),
h5("Check")
),
formattableOutput("case1.Table") %>% withSpinner()
),
即使在生成 table 输出后,shinycssloaders 包的 withSpinner 仍继续加载。
您需要在输出名称中删除点("case1Table"
而不是 "case1.Table"
)
请看以下内容:
library(shiny)
library(formattable)
ui <- fluidPage(
titlePanel("formattableOutput withSpinner"),
sidebarLayout(sidebarPanel(),
mainPanel(tabsetPanel(
tabPanel(
"Call Tab",
wellPanel(
style = "background: white",
wellPanel(style = "background: #ff6666",
h4("Case1:EWS&0Count"),
h5("Check")),
withSpinner({formattableOutput("case1Table")})
)
)
)))
)
server <- function(input, output) {
output$case1Table <- renderFormattable({
formattable(data.frame(replicate(10, runif(10, 0, 10))))
})
}
shinyApp(ui = ui, server = server)