Skip to content

Commit

Permalink
method for hiding bs4Dash::box()
Browse files Browse the repository at this point in the history
  • Loading branch information
calderonsamuel committed Aug 24, 2022
1 parent 9e820c1 commit 3fd2957
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/boxHide.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
boxHide <- function(box) {
boxId <- boxFindId(box)

box |>
tagAppendAttributes(.cssSelector = glue::glue("#{boxId}"), style = "display: none;")
}

boxFindId <- function(box) {
boxQuery <- htmltools::tagQuery(box)
innerBox <- boxQuery$
children(".card")$
selectedTags()[[1]]

tagGetAttribute(innerBox, "id")
}

0 comments on commit 3fd2957

Please sign in to comment.