Description Usage Arguments Value See Also Examples
The select2 input
Some code to include css and js for includeSelect2. This is provide so that the user can have access to select2 even if they only use it in the dynamic UI
Update select2Input
1 2 3 4 5 6 7 | select2Input(inputId, label, choices = NULL, selected = NULL,
type = c("input", "select"), drag.and.drop = FALSE, ...)
includeSelect2(drag.and.drop = FALSE)
updateSelect2Input(session, inputId, label, choices = NULL,
selected = NULL)
|
inputId |
Input variable to assign the control's value to |
label |
Display label for the control |
choices |
List of values to select from. If elements of the list are named then that name rather than the value is displayed to the user. |
selected |
Name of initially selected item (or multiple names if
|
type |
The two valid options are input and select. The input type is similar to a text input and it can remember the order of selection. The select is based on the <select> tags in HTML and is not ordinal hence the order in which you specify the selection is not being taken into account, however it's input parameters are compatible with selectInput and you can use updateSelectInput to update its contents. |
drag.and.drop |
Allow drag and drop or not |
... |
Other arguments to pass into shiny::selectInput |
session |
The Shiny session |
A select list control that can be added to a UI definition.#'
'includeSelect2' returns the HTML to include the Javascripot and CSS of select2.js
Other ShinySky elements: actionButton
,
shinyalert
,
textInput.typeahead
1 2 3 4 5 | ## ui.r
select2Input("select2Input1",
"This is a multiple select2Input",
choices=c("a","b","c"),
selected=c("b","a"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.