InputPanel Module Class
InputPanel.RdInputPanel module that handles inputs based on an input function like:
shiny::selectInput(), shinyWidgets::pickerInput(), etc.
Details
The assigned input values are accessible in the reactive values
inputValues field. Other modules may trigger off these reactive values
with i.e. shiny::observeEvent().
Super class
DarwinShinyModules::ShinyModule -> InputPanel
Active bindings
parentNamespace(
character(1)) Namespace of the parent module.funs(
list()) Named list of xInput functions usedlist(funA = shiny::selectInput).args(
list()) Named list of arguments used by xInput functionslist(funA = list(inputId = "name", label = "name")).inputValues(
reactiveValues) Values passed from the input fields.
Methods
Method new()
Initializer method
Usage
InputPanel$new(funs, args, growDirection = "vertical", ...)Arguments
funs(
list()) Named list of xInput functions usedlist(funA = shiny::selectInput).args(
list()) Named list of arguments used by xInput functionslist(funA = list(inputId = "name", label = "name"))growDirectionThe direction in which this component will be placed, either "horizontal" or "vertical" (default)
...Additional parameters to set fields from the
ShinyModuleparent.
Examples
library(DarwinShinyModules)
inputPanel <- InputPanel$new(
  funs = list(
    select = shiny::selectInput,
    text = shiny::textInput
  ),
  args = list(
    select = list(inputId = "select", choices = c("a", "b"), label = "select"),
    text = list(inputId = "text", label = "text")
  )
)
if (interactive()) {
  preview(inputPanel)
}