Skip to content

Commit b9c6b84

Browse files
committed
selectInput: use BS 3 styling when multiple && !selectize. Closes rstudio#724
1 parent 5ba1d57 commit b9c6b84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

R/bootstrap.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,11 @@ selectInput <- function(inputId, label, choices, selected = NULL,
793793
} else selected <- validateSelected(selected, choices, inputId)
794794

795795
# create select tag and add options
796-
selectTag <- tags$select(id = inputId, selectOptions(choices, selected))
796+
selectTag <- tags$select(
797+
id = inputId,
798+
class = if (multiple && !selectize) "form-control",
799+
selectOptions(choices, selected)
800+
)
797801
if (multiple)
798802
selectTag$attribs$multiple <- "multiple"
799803

0 commit comments

Comments
 (0)