2

pickerInputfrom shinyWidgetspackage 有一个占位符 title Nothing selected

怎么可能用Pick a choice例如替换它?pickerInput如果可能的话,我更喜欢使用 css 或选项的解决方案shinyjs

library(shiny)
library(shinyWidgets)

ui <- fluidPage(

  tags$head(
    tags$style(HTML("

    "))
  ),

  pickerInput(
    inputId = "mtcInputIndicateur", 
    label = "Select values", 
    choices = paste("choice", 1:10),
    options = list(`live-search` = TRUE),
    multiple = TRUE
  )
)



server <- function(input, output){
}

shinyApp(ui, server)

任何帮助将不胜感激。

4

1 回答 1

3

刚刚找到答案,使用中的参数titleoptions

library(shiny)
library(shinyWidgets)

ui <- fluidPage(

  pickerInput(
    inputId = "mtcInputIndicateur", 
    label = "Select values", 
    choices = paste("choice", 1:10),
    options = list(`live-search` = TRUE, title = "Pick a choice"),
    multiple = TRUE
  )
)



server <- function(input, output){
}

shinyApp(ui, server)
于 2019-09-12T08:29:06.500 回答