R/createTabOutput.R

Defines functions createTabOutput

Documented in createTabOutput

#'Utility function to create Tab Items
# Requires specfic module format where outputs are a nammed list (outputs) within the module script.
#' @param tabName string - indicates which tab / sidebar to attribute outputs
#' @return returns a shiny tabName object with appropriate UI ouputs
#' @importFrom shinydashboard tabItem
#' @export
createTabOutput <- function(tabName) {

  UIModuleFunctionName <- paste0(tabName,'UI')

  UIObjects <- do.call(UIModuleFunctionName,list(tabName))$Outputs

  tab <- shinydashboard::tabItem(
    tabName = tabName,
    UIObjects
  )

  return(tab)

}
cusom/CUSOM.ShinyHelpers documentation built on Oct. 23, 2023, 6:50 a.m.