#' Data Table UI
#'
#' @param id a shiny id
#' @param message_html sent to messageBox
#' @param button_text a string
#'
#' @export
data_table_ui <- function(
id,
message_html = "",
button_text = "Download datatable"
){
ns <- shiny::NS(id)
shiny::tagList(
iatlas.modules::messageBox(width = 12, message_html),
shiny::fluidRow(
iatlas.modules::tableBox(
width = 12,
shiny::div(
style = "overflow-x: scroll",
"data_table" %>%
ns() %>%
DT::dataTableOutput(.) %>%
shinycssloaders::withSpinner(.)
)
),
shiny::downloadButton(ns("download_table"), button_text)
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.