DT2 0.1.3
CRAN release: 2026-09-20
New features
Shiny: the widget now exposes which rows are visible after filtering, mirroring the
DTpackage inputs (#20).input$<id>_rows_allholds the 1-based indices of the rows that survive the current global and column searches (including ColumnControl filters),input$<id>_rows_currentthe rows on the current page, andinput$<id>_rows_selectedthe selected rows. The same vectors are also included ininput$<id>_state.Server-side processing:
dt2_ssp_handler()anddt2_bind_server()gain arows_allargument (defaultTRUE). The default handler now returnsdt2_rows_all/dt2_rows_currentin its payload so the inputs above also work in server mode; setrows_all = FALSEto skip shipping the index vector on very large tables.
Bug fixes
Server-side processing:
options = list(server_side = TRUE)(orserverSide = TRUE) now actually enables server-side mode (#22).dt2()put the flag wheredt2.jsdid not look for it, so the table silently ran client-side and shipped every row to the browser. In server modedt2()now sends only the column structure; rows are fetched throughdt2_bind_server().Server-side processing: column ordering now reaches the server (#22). The request encoder in
dt2.jsflattened only one level, so DataTables’order[i][column]/order[i][dir]were lost and rows always came back in source order.
DT2 0.1.2
CRAN release: 2026-06-14
Bug fixes
dt2_cols_escape()now actually escapes HTML whenescape = TRUE(the default). Previously bothescape = TRUEandescape = FALSEproduced the same identity renderer, so cell content was always inserted as raw HTML.Server-side processing: the default request parser used by
dt2_ssp_handler()/dt2_bind_server()now URL-decodes query-string keys, so global search and column ordering are applied. Previously only pagination worked, because encoded keys such assearch%5Bvalue%5Dandorder%5B0%5D%5Bcolumn%5Dwere never matched.
Improvements
dt2()now fillsoptions$columnsfrom the data when it is not supplied, matching the column list the JavaScript side derives.Name-based column helpers (
dt2_cols_*(),dt2_format_*(),dt2_order(), …) now emit an informative warning when a column name cannot be resolved (for example whenoptions$columnswas not set), instead of silently producing an invalid target.The number and date/time format helpers build their JavaScript using properly quoted and escaped string literals, fixing broken output when a prefix, suffix, locale or format string contained a quote.
print()fordt2_themeobjects now also shows theclassfield.
Documentation and infrastructure
- Added a test suite (testthat) covering the fixes above.
- Added a GitHub Actions R-CMD-check workflow.
- Reorganised the pkgdown reference index into thematic sections, added runnable examples to
dt2_order(),dt2_search_global(),dt2_use_buttons()anddt2_language(), cross-linkeddt2_buttons()/dt2_use_buttons(), and documented theoptions$columnspattern in the vignettes. - New package logo.