Learn R Programming

dqshiny (version 0.0.3)

hidden: Sets the initial state of all given tags

Description

Hidden only hides elements on the top level, so showing these elements will also show all children of them.

Disabled will recursively traverse the given elements and its children and set all inputs, buttons, selects and textfields to be disabled.

Usage

hidden(...)

disabled(...)

Arguments

...

tags to add to the ui, can be a single element or nested tagLists

Value

tags with the state change

Examples

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

library(shiny)
shinyApp(
  ui = fluidPage(
    init(),
    actionButton("btn1", "Toggle Display"),
    actionButton("btn2", "Toggle State"),
    hidden(disabled(actionButton("btn3", "Hello")))
  ),
  server = function(input, output) {
    observeEvent(input$btn1, toggle("btn3"))
    observeEvent(input$btn2, toggle_state("btn3"))
  }
)

}
# }

Run the code above in your browser using DataLab