r - 如何在闪亮的应用程序中禁用 checkboxGroupInput 中的多项选择
问题描述
我的闪亮应用中有一个checkboxGroupInput
。似乎始终启用多项选择。我需要的是禁用多项选择,一次只允许一个选择。
有谁知道这是怎么做到的吗?下面闪亮的应用程序示例:
ui <- fluidPage(
checkboxGroupInput("icons", "Choose icons:",
choiceNames =
list(icon("calendar"), icon("bed"),
icon("cog"), icon("bug")),
choiceValues =
list("calendar", "bed", "cog", "bug")
),
textOutput("txt")
)
server <- function(input, output, session) {
output$txt <- renderText({
icons <- paste(input$icons, collapse = ", ")
paste("You chose", icons)
})
}
shinyApp(ui, server)
这是checkboxGroupInput
功能。我很惊讶没有像multiple
. 我应该使用其他小部件来达到这个目的吗?我应该使用什么?
checkboxGroupInput(inputId, label, choices = NULL, selected = NULL,
inline = FALSE, width = NULL, choiceNames = NULL,
choiceValues = NULL)
解决方案
推荐阅读
- python - TypeError:+ 的不支持的操作数类型:使用 discord.py 从 API 提取数据时出现“int”和“str”错误
- c# - 建立连接后如何从服务器(使用连接列表)向客户端发送命令?
- java - Hybris 产品驾驶舱属性部分
- pandas - 在时间之间用时间戳标记行
- php - 奇怪的 Laravel 加密 EncryptString 错误
- dronekit-python - 使用dronekit通过wifi连接bebop parrot无人机
- python - 如何在 python/vtk 中显示 .obj 文件?
- mysql - 将 OVH mysql 数据库链接到我的世界服务器
- regex - url特定部分的正则表达式
- python - pandas - 根据日期提供的 maxtimestamp 在其他列中查找值