mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
add width to selectInput() as well
This commit is contained in:
@@ -696,7 +696,7 @@ choicesWithNames <- function(choices) {
|
||||
#' "Gears" = "gear"))
|
||||
#' @export
|
||||
selectInput <- function(inputId, label, choices, selected = NULL,
|
||||
multiple = FALSE, selectize = TRUE) {
|
||||
multiple = FALSE, selectize = TRUE, width = NULL) {
|
||||
# resolve names
|
||||
choices <- choicesWithNames(choices)
|
||||
|
||||
@@ -723,7 +723,7 @@ selectInput <- function(inputId, label, choices, selected = NULL,
|
||||
# return label and select tag
|
||||
res <- tagList(controlLabel(inputId, label), selectTag)
|
||||
if (!selectize) return(res)
|
||||
selectizeIt(inputId, res, NULL, nonempty = !multiple && !("" %in% choices))
|
||||
selectizeIt(inputId, res, NULL, width, nonempty = !multiple && !("" %in% choices))
|
||||
}
|
||||
|
||||
#' @rdname selectInput
|
||||
|
||||
Reference in New Issue
Block a user