【问题标题】:R Shiny selectizeInput cuts selected keywords in choices listR Shiny selectizeInput 剪切选择列表中的选定关键字
【发布时间】:2022-11-17 13:24:05
【问题描述】:

selectizeInput 有一个令人不安的问题。每当我搜索几个关键词时,这些词都被剪切或完全删除。在下面的最小示例中,当我填写“生产者价格”时,列表中每个选项中的“生产者”一词都被完全删除。

library(shiny)

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      selectizeInput(inputId = "id_category",
                     label = "Category (multiple answers possible)",
                     multiple = TRUE,
                     choices = c("Producer price oil",
                                 "Producer price pulp",
                                 "Producer price oat",
                                 "Import price oil")),
    ),
    mainPanel()
  )
)

server <- function(input, output) {
}

shinyApp(ui, server)

【问题讨论】:

  • 无法重现,一切对我来说都很好。您可以添加屏幕截图吗?
  • 这个github issue看起来很相似,但显然没有解决办法
  • 好像是this issue。
  • selectize.js GitHub 页面上的讨论似乎表明问题已在最新版本 (v0.13.6) 中修复,但看起来 Shiny 仍在使用旧版本。
  • 我提交了一个问题here。

标签: r shiny shinyjs


【解决方案1】:

我看到你提出了一个问题,如果你没有一长串你可以使用的选择,作为一个替代选项 shinyWidgets::pickerInput 它使用与 selectizeInput 相同的参数,多个选择在选项的下拉菜单上得到复选标记。

【讨论】:

    猜你喜欢
    • 2017-12-29
    • 2021-06-10
    • 2019-07-31
    • 2019-05-20
    • 1970-01-01
    • 2020-08-03
    • 2021-01-08
    • 1970-01-01
    • 2019-07-05
    相关资源
    最近更新 更多