DT 0.21
NEW FEATURES
-
Add the
zero.print
argument toformatPercentage()
,formatCurrency()
,formatSignif()
andformatRound()
, 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 argumentrows
(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 usestyleRow()
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 withreplaceData()
(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()
andstyleEqual()
now allows a scalarvalues
argument like other R functions, e.g.,styleRow(1:5, 'abcd')
is the same asstyleRow(1:5, rep('abcd', 5))
. It throws error thatthe 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 ofdata
after R 3.4.0, wherestructure(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).