R/remove_bscui_elements.R

Defines functions remove_bscui_elements

Documented in remove_bscui_elements

###############################################################################@
#' Remove SVG elements from the UI
#'
#' @param proxy a [`bscui_Proxy`] object
#' @param element_ids the identifiers of the elements to remove
#'
#' @return the provided proxy object
#'
#' @example inst/examples/shiny-example.R
#'
#' @export
#'
remove_bscui_elements <- function(proxy, element_ids){
   if(!any(class(proxy) %in% "bscui_Proxy")){
      stop(
         "You can use remove_bscui_elements only within 'shiny' and ",
         "using bscui_Proxy"
      )
   }
   data <- list(id = proxy$id, element_ids = element_ids)
   proxy$session$sendCustomMessage("bscuiShinyRemoveElements", data)
   proxy
}

Try the bscui package in your browser

Any scripts or data that you put into this service are public.

bscui documentation built on June 8, 2025, 11:01 a.m.