Skip to content

Configures the entries-per-page dropdown.

Usage

dt2_length_menu(options = list(), values = c(10, 25, 50, -1), labels = NULL)

Arguments

options

Options list.

values

Numeric vector of page lengths (e.g., c(10, 25, 50, -1)). Use -1 for "show all".

labels

Optional character vector of labels. If NULL, numeric values are used as-is and -1 becomes "All" automatically via language.lengthLabels.

Value

Updated options.

Examples

opts <- dt2_length_menu(values = c(5, 10, 25, -1))
dt2(iris, options = opts)
opts <- dt2_length_menu(values = c(10, 50, 100), labels = c("10", "50", "100")) dt2(iris, options = opts)