Learn R Programming

dqshiny (version 0.0.3)

create_dq_box_group: Create a dq box group

Description

Create a dq box group which automatically collapses all other boxes whenever one box is opened.

Usage

create_dq_box_group(session, ...)

Arguments

session

shiny session object

...

box ids to be combined to one group

Examples

Run this code
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {

library(shiny)
shinyApp(
  ui = fluidPage(
    fluidRow(
      column(6,
        dq_box("Random Input1", dq_space(), "End of Content", id = "box1",
          title = "Box1", width = 12, open_callback = TRUE),
        dq_box("Random Input2", dq_space(), "End of Content", id = "box2",
          title = "Box2", width = 9, collapsed = TRUE, open_callback = TRUE),
        dq_box("Random Input3", dq_space(), "End of Content", id = "box3",
          title = "Box3", width = 12, collapsed = TRUE, open_callback = TRUE)
      )
    )
  ),
  server = function(input, output, session) {
    create_dq_box_group(session, "box1", "box2", "box3")
  }
)

}
# }

Run the code above in your browser using DataLab