Skip to contents

Set column defaults

Usage

set_column_defaults(
  widget,
  editor = FALSE,
  header_filter = FALSE,
  header_sort = TRUE,
  tooltip = TRUE,
  width = NULL,
  ...
)

Arguments

widget

A tabulator() HTML widget.

editor

(character, bool): One of "input" or "number". If set to FALSE cells are not editable.

header_filter

(character, bool): One of "input" or "number". Set to FALSE to disable header filters.

header_sort

(bool): Whether to enable header sorting.

tooltip

(bool): Whether to show tooltips displaying the cell value.

width

(integer): Fixed width of columns.

...

Additional settings.

Value

The updated tabulator() HTML widget

Examples

tabulator(iris, theme = "simple") |>
  set_column_defaults(
    header_filter = TRUE,
    header_sort = FALSE,
    tooltip = TRUE
  )