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
17
18
19
20
21
## Not run: 
## Hide
a <- shiny::tags$p(src = "plop", "pouet")
undisplay(a)
b <- shiny::actionButton("go_filter", "go")
undisplay(b)

## End(Not run)
## Not run: 
## 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)

## End(Not run)

rpodcast/shinylego documentation built on Oct. 1, 2021, 6:37 a.m.