1

给定的图创建如下快照。然而,点击圆形图标后,我只看到下拉列表中的第一个元素,我希望所有下拉元素都出现,即“A”、“B”、“C”、“D”、“E”、“F” ”。我得到的警告在脚本下面提到:

## app.R ##
library(shiny)
library(shinydashboard)
library(shinyWidgets)

ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
),
dashboardBody(

dropdownButton(
  pickerInput(inputId = "uppickerIcons", 
              label = "", 
              choices = c("A", 
                          "B", 
                          "C", 
                          "D", 
                          "E", 
                          "F"), 
              choicesOpt = list(icon = c("glyphicon glyphicon-arrow-right", 
                                         "glyphicon glyphicon-cog", 
                                         "glyphicon glyphicon-play", 
                                         "glyphicon glyphicon-ok-sign", 
                                         "glyphicon glyphicon-euro", 
                                         "glyphicon glyphicon-music")), 
              options = list(`icon-base` = "")),
  circle = TRUE, status = "danger", icon = icon("gear"), width = "300px",
  tooltip = tooltipOptions(title = "Click to see inputs !")
 )
 )
 )
 server <- function(input, output) 
 {
 }
 shinyApp(ui, server)

警告信息:

Warning in if (!is.na(attribValue)) { :
the condition has length > 1 and only the first element will be used
Warning in charToRaw(enc2utf8(text)) :
argument should be a character vector of length 1
all but the first element will be ignored

在此处输入图像描述

4

0 回答 0