display: Hide or display a tag

Description Usage Arguments Value Examples

View source: R/golem_utils_ui.R

Description

Hide or display a tag

Usage

1
2
3
undisplay(tag)

display(tag)

Arguments

tag

the tag

Value

a tag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Hide
a <- shiny::tags$p(src = "plop", "pouet")
undisplay(a)
b <- shiny::actionButton("go_filter", "go")
undisplay(b)

## Show
a <- shiny::tags$p(src = "plop", "pouet")
a_hidden <- undisplay(a)
display(a_hidden)
# do not change not hidden tags
b_show <- shiny::actionButton("go_filter", "go")
display(b_show)
# Keep other attributes
b_show$attribs$style <- 'display: none; background: red'
display(b_show)

sharlagelfand/packagerecs documentation built on May 29, 2019, 1:26 p.m.