Skip to contents

InputPanel 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 used list(funA = shiny::selectInput).

args

(list()) Named list of arguments used by xInput functions list(funA = list(inputId = "name", label = "name")).

inputValues

(reactiveValues) Values passed from the input fields.

Methods

Inherited methods


Method new()

Initializer method

Usage

InputPanel$new(funs, args)

Arguments

funs

(list()) Named list of xInput functions used list(funA = shiny::selectInput).

args

(list()) Named list of arguments used by xInput functions list(funA = list(inputId = "name", label = "name"))

Returns

(invisible(self))


Method validate()

Validation method

Usage

InputPanel$validate()

Returns

(self)


Method clone()

The objects of this class are cloneable with this method.

Usage

InputPanel$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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)
}