r-world-devs / shinyGizmo

https://r-world-devs.github.io/shinyGizmo
Other
19 stars 0 forks source link

Add `commonInput` feature #18

Closed krystian8207 closed 2 years ago

krystian8207 commented 2 years ago

The functionality allows to merge multiple input controllers into one input sent to the server.

Sample usage:

  1. commonInputs - merge multiple inputs at once
commonInputs(id = "val",
  selectInput("subval_1", ..., choices = letters, selected = "a"),
  sliderInput("subval_2", ..., min = 0, max = 10, value = 2)
)

which send to the server:

input$val == list(subval_1 = "a", subval_2 = "2")

Extra arguments:

  1. commonInput - merge each input controller separately marked with common identifier
commonInput(id = "val",  selectInput("subval_1", ..., choices = letters, selected = "a")),
hr(),
commonInput(id = "val",   sliderInput("subval_2", ..., min = 0, max = 10, value = 2))

So you may mark inputs in different application places.

Extra arguments: