set_header_filter | R Documentation |
Set header filter
set_header_filter(
widget,
column,
type = c("input", "number", "list", "tickCross"),
func = c("like", "=", ">", ">=", "<", "<="),
values_lookup = TRUE,
clearable = TRUE,
placeholder = NULL
)
widget |
A |
column |
The name of the column the formatter is applied to. |
type |
(character): The type of the filter. |
func |
(character): The filter function. |
values_lookup |
(bool): Whether to use unique column values for the list filter. |
clearable |
(bool): Whether to display a cross to clear the filter. |
placeholder |
(character): Text that is displayed when no filter is set. |
The updated tabulator()
HTML widget
data <- data.frame(
age = c(10, 20, 40),
first_name = c("Franz", "Ferdinand", "Julia"),
last_name = c("Young", "Bowie", "Blackey")
)
tabulator(data) |>
set_header_filter("age", type = NULL, func = "<=", placeholder = "max age") |>
set_header_filter("first_name", placeholder = "Fran") |>
set_header_filter("last_name", type = "list")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.