默认情况下,当用户选择下拉列表时,它会显示choices参数中列出的所有值。我只想在用户开始在搜索框中输入时显示建议。live-search = TRUE当用户在搜索框中输入时,我正在使用 实时建议。
library(shiny) library(shinyWidgets) my_autocomplete_list <- c("ICICI Prudential aaaa","ICICI Prudential bbbb","ICICI Prudential ccccc", "Tata dddd","eeee") ui <- fluidPage( sidebarLayout( sidebarPanel( pickerInput( inputId = "fundname", label = "Search Fund", choices = my_autocomplete_list, options = list(title = "Search Fund", `live-search` = TRUE) ), actionButton("submit", "Submit") ), mainPanel( ) ) ) server <- function(input, output, session) { } # Run App shinyApp(ui = ui, server = server)