View source: R/shiny-compoundInput2.R
updateCompoundInput2 | R Documentation |
Update compound inputs
updateCompoundInput2(
session,
inputId,
value = NULL,
ncomp = NULL,
initialization = NULL,
...
)
session |
shiny session or session proxy |
inputId |
character see |
value |
list of lists, see |
ncomp |
integer, non-negative number of groups to update, |
initialization , ... |
named list of other updates |
none
compoundInput2
for how to define components.
## Not run:
library(shiny); library(dipsaus)
## UI side
compoundInput2(
'input_id', 'Group',
div(
textInput('text', 'Text Label'),
sliderInput('sli', 'Slider Selector', value = 0, min = 1, max = 1)
),
label_color = 1:10,
value = list(
list(text = '1'), # Set text first group to be "1"
'', # no settings for second group
list(sli = 0.2) # sli = 0.2 for the third group
))
## server side:
updateCompoundInput2(session, 'inputid',
# Change the first 3 groups
value = lapply(1:3, function(ii){
list(sli = runif(1))
}),
# Change text label for all groups
initialization = list(
text = list(label = as.character(Sys.time()))
))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.