Description Usage Arguments Details Value
View source: R/ch_list_select.R
Creates a list of shiny objects to encapsulate the operation of selecting an item from a list.
1 | ch_list_select(id, item = "item", plural = NULL)
|
id |
character, tag to prepend to the input and output id's |
item |
character, for the ui, what to call the item being added - default is "item" |
plural |
character, for the ui, what to call the plural of the item being added
- default is |
The list of shiny objects will contain:
ui_controllershiny::taglist of ui elements for the controller
ui_viewshing::taglist of ui elements for the view
server_modelfunction with reactive code
The list returned by this function has to be available to both the ui and the server.
If not using the shinyApp formulation, perhaps global.R could be useful.
The list ui_controller will have members:
itemshiny::selectInput used to select the name of the item to be copied from the list
The list ui_view will have members:
statusshiny::verbatimTextOutput showing what has been selected from the list
The function server_model() will be called from your server function.
Its arguments are:
input, output, sessioninput, output, session values passed from your server function
rctval_list, item_listshiny::reactiveValues object, character string
rctval_list[[item_list]] is expected to be a list,
from which the selected item will be copied
rctval_dest, item_destshiny::reactiveValues object, character string
The default value for rctval_dest is rctval_list.
rctval_dest[[item_dest]] is where the selected item will be copied.
list containing ui_controller, ui_view, and server_model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.