• Make sure number inputs return numeric values when editing numeric table cells (thanks, @stla, #987).
  • Enhancements to updateFilters() (#971):

    • Added support for data with integer and character columns (@mikmart #972).
    • Fixed an issue with length 1 options causing filters not to update (@mikmart #973).
    • Fixed an issue with slider limits sometimes being incorrectly scaled (@mikmart #974).
    • Updates to factor and logical filters now match the initial render (@mikmart #975).
    • Disabled status is now also affected by updates (@mikmart #977).
  • New functions doColumnSearch() and doGlobalSearch() let you do server-side searching with filter search strings. These are particularly useful in conjunction with updateFilters() for implementing dynamic limits for filter controls based on currently filtered data (@mikmart #982).

  • Server-side searching is now faster when multiple filters are active (@mikmart).

  • Fix a bug that the column filter didn’t work for strings like “+” (@stephan-hutter @shrektan #980).

NEW FEATURES

  • Add the zero.print argument to formatPercentage(), formatCurrency(), formatSignif() and formatRound(), which allows to control the format of zero values. It’s useful when the data is “sparse” (thanks, @shrektan #953).

  • formatXXX() functions now gain a new argument rows (starting from 1), which can be used to specify the rows that the “style” should be applied to. Note that it only works expected in the client-side processing mode, i.e., server = FALSE. formatStyle() is the only exception that doesn’t have this argument and should use styleRow() instead (thanks, @jrecasens @shrektan #520).

  • Added a new function updateFilters to allow users to update the filters of a DataTable object that has been updated by reference, such as with replaceData() (thanks, @giadasp #934, @wholmes105 #939).

MAJOR CHANGES

  • Now users can provide column names of the data to options$columnDefs$targets. Previously, it only supports column indexes or "_all" (thanks, @shrektan #948).

MINOR CHANGES

  • styleRow() and styleEqual() now allows a scalar values argument like other R functions, e.g., styleRow(1:5, 'abcd') is the same as styleRow(1:5, rep('abcd', 5)). It throws error that the length(rows) must be equal to length(values) in the previous version (thanks, @shrektan #955).

BUG FIXES

  • Fix the bug that addRow() doesn’t support a list of data after R 3.4.0, where structure(NULL, ...) was deprecated (thanks, @stla @shrektan #959).

  • Fix the bug that DT table can’t vertically fill the container, e.g., RStudio IDE or FlexDashboard (thanks, @mbojan @shrektan #951).

  • Fix the bug that DT failed to parse ajax request correctly, when special strings like “=” exist (thanks, @shrektan #965).

MAJOR CHANGES

NEW FEATUERS

  • Add vertical and opacity option to filter which applies to the noUiSliders. This is useful with limited width DataTables to prevent x overflow (thanks, @alexvpickering, #919).

  • Now the user is able to restrict the editing to accept only numbers by, e.g., datatable(..., editable = list(target = "cell", numeric = 3:5)). By default, the editing is restricted to numbers for all numeric columns; set numeric = "none" to disable this behavior (thanks, @stla, #860 #824).

  • Now the user can request text areas for the editing by, e.g., datatable(..., editable = list(target = "cell", area = 1:2)). Text areas are useful for cells with large contents (thanks, @stla #860, @fabiangehring #671).

MAJOR CHANGES

  • Upgraded jQuery from v1.12.4 to v3.x imported from the jquerylib R package.

NEW FEATURES

  • datatable()’s style argument now defaults to 'auto', which resolves to either 'bootstrap' or 'bootstrap4' when a bslib theme is relevant. If a bslib theme isn’t relevant, 'auto' resolves to the old default value of 'default' (thanks, @cpsievert, #852).

  • Add a new function styleRow(). It’s useful when you want to apply CSS styles based on Row Indexes (thanks, @s-fleck, #894).

BUG FIXES

  • datatable(data) and datatable(data, fillContainer = TRUE) now work as expected when statically rendered inside flexdashboard::flex_dashboard() (thanks, @cpsievert, #904).

NEW FEATURES

  • Support the new datatables’ extension SearchBuilder. With this new extension, users can construct a complex search query by adding groups and conditions. Note, as the time of writing, this extension only works on the client-side processing mode (thanks, @stla, #875)

  • Add a new plugin diacritics-neutralise, which can be used for searching accented, non-Latin characters with their unaccented counterparts. Note, it will only work in the client-side processing mode (thanks, @tyler-richardett, #887).

MINOR CHANGES

  • The autoHideNavigation argument now works with the default theme. In addition, the prerequisite is properly documented. Specifically speaking, it only works when the pageLength option is provided and is rendered in the client-side processing mode (thanks, @bhogan-mitre, #856).

  • When editing factor columns, editData() now automatically updates the factor levels if it’s necessary (thanks, @aman-malik3010, #865).

BUG FIXES

  • Fix the issue that addRow() would fail when the proxy DT table contains no data (e.g., a zero-row data.frame) (thanks, @chalioui, #888).

  • DT no longer overrides the options$responsive to TRUE. Thus, it enables users to provide customized options for the Responsive extension (thanks, @hdrab127, #885).

NEW FEATURES

  • Add a new plugin accent-neutralise, which can be used for searching accented characters with their unaccented counterparts. Note, it will only work in the client-side processing mode (#822).

  • addRow() now has a new parameter resetPaging. By setting it to FALSE, we can keep the paging position after adding a row (thanks, @stanstrup, #853).

MINOR CHANGES

BUG FIXES

BUG FIXES

  • Fix the issue that the formatting functions may throw error for named colname inputs (thanks, @jarauh @shrektan, #831).

  • The input$xxx_xxx_selected values will always be reset to NULL or an empty list when the table gets reloaded (thanks, @stibu81 @shrektan, #828).

NEW FEATURES

  • Now the user is able to control the selection range by datatable(..., selection = list(selectable = 3:5)), where positive and non-positive selectable means “enable” and “disable”, respectively (thanks, @tomasreigl @shrektan, #201 #793).

  • Added a function styleValue() to use column values as CSS values. When the user has a complex CSS rule to apply, storing the CSS values in the columns of the table and call this function is very convenient (thanks, @Mosk915 @shrektan, #801 #802).

  • Clicking on a row or cell now always triggers a reactive event in Shiny (input$tableId_row_last_clicked or input$tableId_cell_clicked), even if the same row or cell is clicked multiple times (thanks @gadenbuie, #811).

BUG FIXES

  • Fix the issue that formatting functions don’t support vectorized arguments any longer. This was a regression of PR #777 (thanks, @pbreheny @shrektan, #790).

  • Fix the issue that styleEqual() incorrectly uses the column values as the default css values. This was a regression of PR #702 (thanks, @Chr96er @shrektan, #799)

MINOR CHANGES

  • The formatting functions now throw clearer error messages when called on non-datatables objects (thanks, @shrektan, #785).

  • Now the server argument in renderDT() is reactive in Shiny (thanks, @shrektan, #794).

  • Incorrect selection param now triggers a clear error message on the R side (thanks, @shrektan, #795).

BUG FIXES

NEW FEATURES

NEW FEATURES

BUG FIXES

NEW FEATURES

BUG FIXES

  • Highlighting when searching with regex (i.e., using options = list(searchHighlight = TRUE, search = list(regex = TRUE)) for the table) works now (thanks, @lrasmus, #719).

  • Updated the AutoFill extension (thanks, @stla @shrektan, #711).

MINOR CHANGES

  • In the server-side processing mode, filters now use Perl-compatible regular expressions (regexps), such as for lookround and negating assertions, see help(regex) or https://perldoc.perl.org/perlre.html. This may be most useful in columns (DT::renderDataTable(filter = list(position = "top"), options = list(search = list(regex = TRUE))), but also works in the global search (thanks, @rfhb, #727).

  • For a factor column, the choices of the filter now use the factor levels (#728).

BUG FIXES

  • Fix the issue that styleEqual() doesn’t work expectedly for values contain special HTML character like > or < (thanks, @hjia222 #723).

NEW FEATURES

BUG FIXES

  • Fix the issue that the first column can’t be disabled from editing (thanks, @tsolloway #669, @haozhu233 #694).

  • Fix the issue that the filter boxes are not anchored to the corresponding value columns when there are many columns (thanks, @philibe, #554).

  • Column selection now works in row+column selection mode, when one of scrollX or scrollY is enabled (thanks, @akarslan #705).

MINOR CHANGES

  • Upgraded DataTables from 1.10.16 to 1.10.19.

BUG FIXES

  • For datatable(), options$buttons now works as expected when providing a scalar string or a boolean value (thanks, @shrektan, #685 #658).

  • Fix the issue that when parameters of the formatXXX() functions contain single quotes, they may lead to incorrect JavaScript code due to failing to escape the single quotes (thanks, @shrektan #683 #666, @lorenzwalthert #667).

BUG FIXES

  • Bulk table editing doesn’t work for the client-side processing mode without Shiny (e.g. a DataTable on a static HTML page).

NEW FEATURES

  • The table editor has been enhanced: now the editable argument of datatable() can take four possible values, cell (or TRUE for backward compatibility), row, column, or all, which means you can edit a single cell a time, or a whole row or column, or all cells in the table. To trigger the editor, doubleclick on any cell. To submit the edit, hit Ctrl + Enter when multiple cells are being edited, or hit Esc to cancel the edit. See https://github.com/rstudio/DT/tree/main/inst/examples/DT-edit for comprehensive examples (thanks, @LukasK13 #509 and @mgirlich #493).

  • Editing can be disabled on specified columns now: pass a list of the form list(target = TARGET, disable = list(columns = INDICES)) to the editable argument of datatable(), where TARGET can be 'cell', 'row', 'column', or 'all', and INDICES is an integer vector of column indices (thanks, @opremicSebastian #657, @l-ts #550).

  • Added a funcFilter argument to DT::renderDT() (thanks, @galachad, #638).

BUG FIXES

  • Fixed the issue where replaceData() didn’t work when used in Shiny modules (thanks, @donarus, #628, #626).

  • The JavaScript event cell_edit now always triggers a reactive event on the R side. Since cell_edit will only be triggered when the value shown on the table has been changed so it’s almost always what user expects (thanks, @shrektan @stelmath, #647 #645).

  • Fix the issue that the server-side search option doesn’t handle exotic encoding correctly, because after httpuv v1.5.0, shiny::parseQueryString() always assumes the input is an UTF-8 encoded string (thanks, @shrektan @phileas-condemine, #656).

NEW FEATURES

BUG FIXES

BUG FIXES

NEW FEATURES

MAJOR CHANGES

  • Searching in the server-side processing mode has enabled the “smart” mode by default (https://datatables.net/reference/option/search.smart). Previously this only works in the client-side processing mode. If you want to disable the smart filtering, you can set the initialization options in datatable() (e.g., options = list(search = list(smart = FALSE))). The smart filtering means spaces in the global search keyword in the table will have a special meaning: each returned record in the table should match all of the words separated by spaces (thanks, @carlganz, #453; @keshavramaswamy, #391).

  • For client-side tables in Shiny, the indices of selected rows (input$tableId_rows_selected) will include the rows that are not visible in the current view after filtering is applied. If you want to exclude the indices of such rows, you can take the intersection of input$tableId_rows_selected and input$tableId_rows_all (the latter is the indices of all rows after filtering is applied).

MINOR CHANGES

  • Upgraded DataTables from 1.10.12 to 1.10.16.

BUG FIXES

NEW FEATURES

MAJOR CHANGES

  • Upgraded the DataTables library to 1.10.12; there have been many changes from 1.10.7 to this version: http://datatables.net/blog/2015-08-13

    • The extensions argument of datatable() should be a character vector now; previously it can be a list of initialization options for extensions due to the inconsistent ways of initializing DataTables extensions; now the initialization options for all extensions can be set in the options argument.
    • The copySWF() function has been removed, since the TableTools extension has been removed.
    • The ColVis extension was removed and replaced but the colvis button in the Buttons extension.
  • In the previous version, row names were used as row indices in the server-side processing mode, but numeric row indices were used in the client-side mode. Now we always use numeric row indices in both modes for the sake of consistency. These input values in Shiny will always be integers: input$tableId_rows_current, input$tableId_rows_all, and input$tableId_rows_selected.

  • formatCurrency() puts the currency symbol after the minus sign now, e.g. previously you might see $-20 but now it is displayed as -$20 (#220).

BUG FIXES

  • Initial CRAN release.