dt2_cols_render_js: Attach a raw JS render function to columns

View source: R/dt2_formats.R

dt2_cols_render_jsR Documentation

Attach a raw JS render function to columns

Description

Provide a custom JS renderer for one or more columns. Use this when you need fine control over columns.render, including returning different outputs based on type (display/sort/filter/type).

Usage

dt2_cols_render_js(options = list(), col_specs, js_render)

Arguments

options

List returned, with columnDefs appended.

col_specs

Column names or indices.

js_render

A htmlwidgets::JS() function of signature function(data, type, row, meta) { ... }.

Value

Modified options.

See Also

https://datatables.net/reference/option/columns.render


DT2 documentation built on June 14, 2026, 9:06 a.m.