gpt4 book ai didi

css - picketInput 更改占位符 R Shiny Widgets

转载 作者:太空宇宙 更新时间:2023-11-04 05:54:56 25 4
gpt4 key购买 nike

shinyWidgets 包中的 pickerInput 有一个占位符标题 Nothing selected

如何用 Pick a choice 替换它?我更喜欢使用 css 或 pickerInput 选项的解决方案,如果可能的话避免使用 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)

如有任何帮助,我们将不胜感激。

最佳答案

刚刚找到答案,在options中使用参数title

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)

关于css - picketInput 更改占位符 R Shiny Widgets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57902695/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com