busyIndi cator未显示在R闪亮的应用程序中

问题描述 投票:3回答:1

我有一个带有tabsetpanel的闪亮应用程序,其中的选项卡也细分为2个选项卡,并且当Shiny忙于在一个子选项卡中加载数据时,我希望显示一个简单的busyIndi​​cator(默认加载图像)。

简化的代码段:

tabsetPanel(id = "tabs",
    tabPanel(value = 3, ("Tab3"),
           tabsetPanel(id = "subPanel3", position = "left",
                tabPanel(value = 9, ("View"), icon = icon("eye-open", lib = "glyphicon"),
                   busyIndicator(text = "Loading, please wait...", wait = 400), (...)
                   DT::dataTableOutput("lc")

我以前使用过此功能,但是这次没有显示,我也不知道为什么。有什么改变吗?我没有看到任何需要的ShinySky更新。谢谢!

r shiny shinysky
1个回答
0
投票

我也遇到过类似的问题-尽管我不确定我的解决方案能否解决您的问题。另外,我参加聚会可能为时已晚,但可能对其他人有所帮助。

在我的情况下,busyIndicator隐藏在其他输出(表格,曲线等)的后面。通过将busyIndicator线移到dataTableOutput线的下方,它变得可见。也就是说,交换tabPanel中的两行:

tabsetPanel(id = "tabs",
    tabPanel(value = 3, ("Tab3"),
           tabsetPanel(id = "subPanel3", position = "left",
                tabPanel(value = 9, ("View"), icon = icon("eye-open", lib = "glyphicon"),
                   DT::dataTableOutput("lc")
                   busyIndicator(text = "Loading, please wait...", wait = 400)
© www.soinside.com 2019 - 2024. All rights reserved.