Description Usage Arguments Value See Also Examples
Formats the DT Data Table based on the options specified in the configuration.
1 |
dt |
A DT DataTable. |
xt |
Config mode from context. |
the newly formatted DT DataTable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | onetable_df <- data.frame(
a0_num = c(1, 2, 3, 4)
)
onetable_xt <- list(
.default = list(
col_name = NA_character_,
class = NA_character_,
ui_name = NA_character_,
hover = NULL,
widget = NULL,
format = NULL,
column_width = 3,
width = "100%",
visible = TRUE,
enabled = TRUE,
validate = NULL
),
.options = list(),
a0_num = list(
col_name = "a0_num",
class = "numeric",
ui_name = "Col A0",
hover = "Numeric, no decimals",
widget = "numericInput",
format = "",
validate = NULL
)
)
context_default <- list(
tbl_name = "onetable",
tbl_lst = list(
onetable = onetable_df
),
filter_lst = NULL,
mode = "dt",
xt_lst = list(
onetable = onetable_xt
)
)
xt <- shinyXT::getConfigMode(context_default)
dt <- shinyXT::createDT(context_default) %>%
shinyXT::formatDT(xt = xt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.