tabPanel("Call Tab",
wellPanel(style = "background: white",
wellPanel(style = "background: #ff6666",
h4("Case1:EWS&0Count"),
h5("Check")
),
formattableOutput("case1.Table") %>% withSpinner()
),
即使在生成表输出之后,shinycssloaders软件包的withSpinner仍会继续加载。
答案 0 :(得分:1)
您需要在输出名称中放置点("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)