Is it possible for withSpinner to have an additional parameter called id with default value of NULL? And if it is NULL, it would get a random value from digest? There are cases where one would like to hide a widget and its spinner. Placing a specific id for the spinner did the trick for me.
withSpinner <- function(ui_element, type=getOption("spinner.type",default=1),color=getOption("spinner.color",default="#0275D8"),size=getOption("spinner.size",default=1),color.background=getOption("spinner.color.background"),custom.css=FALSE,proxy.height=if (grepl("height:\\s*\\d",ui_element)) NULL else "400px", id = NULL) {
stopifnot(type %in% 1:8)
if (grepl("rgb",color,fixed=TRUE)) {
stop("Color should be given in hex format")
}
# each spinner will have a unique id, to allow seperate sizing - based on hashing the UI element code
if (is.null(id)){
id <- paste0("spinner-",digest::digest(ui_element))
}
...
Hello,
Is it possible for withSpinner to have an additional parameter called id with default value of NULL? And if it is NULL, it would get a random value from digest? There are cases where one would like to hide a widget and its spinner. Placing a specific id for the spinner did the trick for me.