Skip to content

Commit e886558

Browse files
committed
roxygenize
1 parent 8dd6dab commit e886558

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

man/selectInput.Rd

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
\alias{selectizeInput}
55
\title{Create a select list input control}
66
\usage{
7-
selectInput(inputId, label, choices, selected = NULL, multiple = FALSE)
7+
selectInput(inputId, label, choices, selected = NULL, multiple = FALSE,
8+
selectize = TRUE)
89

910
selectizeInput(inputId, ..., options = NULL)
1011
}
@@ -25,13 +26,16 @@ selectizeInput(inputId, ..., options = NULL)
2526
2627
\item{multiple}{Is selection of multiple items allowed?}
2728
28-
\item{...}{arguments passed to \code{selectInput()}}
29+
\item{selectize}{Whether to use \pkg{selectize.js} or
30+
not.}
2931
30-
\item{options}{a list of options; see the documentation
32+
\item{...}{Arguments passed to \code{selectInput()}.}
33+
34+
\item{options}{A list of options. See the documentation
3135
of \pkg{selectize.js} for possible options (character
3236
option values inside \code{\link{I}()} will be treated as
3337
literal JavaScript code; see
34-
\code{\link{renderDataTable}()} for details)}
38+
\code{\link{renderDataTable}()} for details).}
3539
}
3640
\value{
3741
A select list control that can be added to a UI definition.
@@ -45,6 +49,16 @@ multiple items from a list of values.
4549
(\url{https://github.com/brianreavis/selectize.js}) to extend the basic
4650
select input element.
4751
}
52+
\note{
53+
The selectize input created from \code{selectizeInput()} allows
54+
deletion of the selected option even in a single select input, which will
55+
return an empty string as its value. This is the default behavior of
56+
\pkg{selectize.js}. However, the selectize input created from
57+
\code{selectInput(..., selectize = TRUE)} will ignore the empty string
58+
value when it is a single choice input and the empty string is not in the
59+
\code{choices} argument. This is to keep compatibility with
60+
\code{selectInput(..., selectize = FALSE)}.
61+
}
4862
\examples{
4963
selectInput("variable", "Variable:",
5064
c("Cylinders" = "cyl",

0 commit comments

Comments
 (0)