在R中使用条件面板和PickerInput

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

在下面给出的R闪亮脚本中,我正在尝试使用带有Picker Input闪亮小部件的条件面板。在pickerInput中有三个选项,在选择“times”选项后,我希望使用条件面板创建新的pickerInputs,使用selectInput可以实现以下功能,但我需要对Picker Input使用相同的选项。谢谢,请帮助。

library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Picket",titleWidth = 290),
dashboardSidebar(width = 0),
dashboardBody(
tabsetPanel(type = "tab",
            tabPanel("Overview", value = 1,

                     box(
                       column(1, 
                              dropdown(
                                pickerInput(inputId = "resources", 
                                            label = "", 
                                            choices = c("cases", 
                                                        "activities", 
                                                        "times"), 
                                            choicesOpt = list(icon = c("fa fa-bars", 
                                                                       "fa fa-bars", 
                                                                       "fa fa-safari")), 
                                            options = list(`icon-base` = "")),
                                circle = FALSE, status = "primary", icon = icon("list", lib = "glyphicon"), width = "300px"
                              ),
                              conditionalPanel(
                                condition = "input.Position == 'times' ",
                                dropdown(
                                pickerInput(inputId = "Id072", 
                                            label = "Select/deselect all options", 
                                            choices = c("A","Check-out", "b","c","d","e","f")
                                            )))))),

id= "tabselected"

            )

            ))


server <- function(input, output) { 
}
shinyApp(ui, server)
r shiny shinydashboard shinyapps
1个回答
2
投票

这个qazxsw poi不应该是qazxsw poi吗?

© www.soinside.com 2019 - 2024. All rights reserved.