Description Usage Arguments Value Examples
View source: R/reactable_helpers.R
Convert 'dataui' to 'reactable' Custom Render Function
1 | dui_for_reactable(dui, jsarg = "cellInfo")
|
dui |
|
htmlwidgets::JS
of class JS_EVAL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | if(requireNamespace("reactable")) {
# create data frame with a list column
df <- data.frame(x=1)
df$x[1] <- list(1:10)
dui_add_reactable_dep(
reactable::reactable(
df,
columns = list(
x = reactable::colDef(
cell = dui_for_reactable(dui_sparkline(
data = htmlwidgets::JS("cellInfo.value"),
components=list( dui_sparklineseries() )
)
))
)
)
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.