#' dt_with_features
#'
#' @param d_table a resolved reactive returning a data frame
#'
dt_with_features <- function(d_table) {
DT::datatable(
d_table,
extensions = 'Buttons',
filter = "top",
class = "display compact nowrap",
style = "bootstrap4",
options = list(
scrollX = T,
dom = 'frtipB',
buttons = buttons_for_dt()
)
)
}
#' dt_simple_with_download
#'
#' @param d_table a resolved reactive returning a data frame
#'
dt_simple_with_download <- function(d_table) {
DT::datatable(
d_table,
extensions = 'Buttons',
class = "display compact nowrap",
style = "bootstrap4",
options = list(
scrollX = T,
dom = 'tB',
buttons = c('copy', 'csv', 'excel')
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.