Generate sticky column definitions for a Reactable table
colDef_sticky.Rd
The colDef_sticky
function generates column definitions with sticky behavior
for a Reactable table. It creates column definitions based on provided column names
and the side to which the columns should stick.
Arguments
- cols
A character vector specifying the column names for which the sticky column definitions are to be generated.
- side
A character string specifying the side to which the columns should stick. Default is "left".
Examples
library(reactable)
library(dplyr)
mtcars %>%
rownames_to_column("cars") %>%
reactable(
defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
columns = combined_named_lists(
colDef_sticky(cols = c("cars", "mpg"))
)
)
#> Error in map(item_list, names): could not find function "map"
# This example creates a Reactable table with sticky columns
# using the \code{colDef_sticky} function.