4
4
\alias {selectizeInput }
5
5
\title {Create a select list input control }
6
6
\usage {
7
- selectInput(inputId , label , choices , selected = NULL , multiple = FALSE )
7
+ selectInput(inputId , label , choices , selected = NULL , multiple = FALSE ,
8
+ selectize = TRUE )
8
9
9
10
selectizeInput(inputId , ... , options = NULL )
10
11
}
@@ -25,13 +26,16 @@ selectizeInput(inputId, ..., options = NULL)
25
26
26
27
\i tem{multiple}{Is selection of multiple items allowed?}
27
28
28
- \i tem{...}{arguments passed to \c ode{selectInput()}}
29
+ \i tem{selectize}{Whether to use \p kg{selectize.js} or
30
+ not.}
29
31
30
- \i tem{options}{a list of options; see the documentation
32
+ \i tem{...}{Arguments passed to \c ode{selectInput()}.}
33
+
34
+ \i tem{options}{A list of options. See the documentation
31
35
of \p kg{selectize.js} for possible options (character
32
36
option values inside \c ode{\l ink{I}()} will be treated as
33
37
literal JavaScript code; see
34
- \c ode{\l ink{renderDataTable}()} for details)}
38
+ \c ode{\l ink{renderDataTable}()} for details). }
35
39
}
36
40
\v alue{
37
41
A select list control that can be added to a UI definition.
@@ -45,6 +49,16 @@ multiple items from a list of values.
45
49
(\u rl{https://github.com/brianreavis/selectize.js}) to extend the basic
46
50
select input element.
47
51
}
52
+ \n ote{
53
+ The selectize input created from \c ode{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
+ \p kg{selectize.js}. However, the selectize input created from
57
+ \c ode{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
+ \c ode{choices} argument. This is to keep compatibility with
60
+ \c ode{selectInput(..., selectize = FALSE)}.
61
+ }
48
62
\e xamples{
49
63
selectInput("variable", "Variable:",
50
64
c("Cylinders" = "cyl",
0 commit comments