Generate column definitions with minimum width for specified columns in a Reactable table
colDef_minwidth.Rd
The colDef_minwidth
function generates column definitions with a minimum width
for specified columns in a Reactable table. It creates column definitions based on
provided column names and the desired minimum width.
Arguments
- cols
A character vector specifying the column names for which the minimum width column definitions are to be generated.
- width
An integer specifying the minimum width for the specified columns.
Examples
mtcars %>%
rownames_to_column("cars") %>%
reactable(
defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
columns = combined_named_lists(
colDef_minwidth(cols = c("mpg", "cyl"), width = 300)
)
)
#> Error in map(item_list, names): could not find function "map"