【发布时间】:2021-07-10 03:46:50
【问题描述】:
I need to show "fileinput"/file upload option when a particular tabpanel is selected.
例如。有 3 个选项卡面板,如 A、B 和 C
When tab B is selected the "fileinput" option should appear and when A or C is selected, the "fileinput" option should be hidden from the sidebarpanel.
我尝试了以下但没有工作。任何人都可以帮忙吗?谢谢...
sidebarPanel(
conditionalPanel(condition = "input$id == 'B'", fileInput("file", "Choose xlsx file", accept = ".xlsx"))
mainPanel(
tabsetPanel(
tabPanel("A", value = 'A', DT::dataTableOutput("Table A")),
tabPanel("B", value = 'B', DT::dataTableOutput("Table B")),
tabPanel("C", value = 'C', DT::dataTableOutput("Table C")),
id ="tabselected"
)
)
【问题讨论】:
标签: r shiny shinydashboard shinyapps shiny-reactivity