Skip to contents

The colDef_hide function generates column definitions to hide specified columns in a Reactable table without removing them from the data frame object. It creates column definitions based on provided column names.

Usage

colDef_hide(cols)

Arguments

cols

A character vector specifying the column names to be hidden.

Value

A list of column definitions suitable for use in a Reactable table.

Examples


mtcars %>%
  rownames_to_column("cars") %>%
  reactable(
    defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
    columns = combined_named_lists(
      colDef_hide(cols = c("vs", "am", "gear", "carb", "wt"))
    )
  )
#> Error in map(item_list, names): could not find function "map"