- DataTables uses the `DT` namespace for events internally and will
remove them automatically on destroy, but `dt` is used for public
events. As such, the public events used internally should use `.dt.DT`
to ensure that the listener works as expected, but also so that the
destroy call will remove these listeners
- This is to preserve user added listeners on destroy. If they want to
remove their listeners to prevent memory leaks, then they should do
so. But DataTables won't do it for them, as actually, you might want
to keep your event listeners!
- fnServerData's second parameter should be an array of objects with
name/value pairs. It was being passed through as the more modern
object, but fnServerData is only present for compatiblity with 1.9 and
should the original format should be retained. This is done with a
simple map function
found
- The old fnGetData method would return null, rather than undefined for
some reason if a given row was not found in the DataTable. The new
wrapper api for the legacy interface should do the same.
- Previously if you cancelled an Ajax request, or the browser did (for
example following a link) the error handler would be entered and show
an alert. This just ensures that the request is complete before
showing an error
- Previously when using columns.render as an object, you had to supply
an `_` option which was the fallback. However, I've now made it so
that if there is no `_` option it will just use the raw data from
`columns.data`
- I've come accross a lot of cases recently where numbers need to be
formatted for display, so I wanted to introduce rendering helpers for
DataTables to make this easier. Only one helper introduced here -
`$.fn.dataTable.render.number()` which will return an object that can
be used by `columns.render` to format "raw" numbers.
- The child row feature of DataTables should be able to take a `tr`
element and add that directly as a child. That wasn't working due to a
logic error before.
would be removed from the array of data passed through to the custom
filtering functions. This would cause indexes to misalign.
- The fix is to simply pass in the data filter array that has already
been computed, as that is 1:1 for the display. Also added the raw data
source object for the row for completeness and a bit of a code tidy
up.
- This will cause a bit of an indexing issue, if you have bVisible:false
set, but this is certainly a bug that had to be fixed - it just didn't
make sense as it was, and went against the documentation!
- See thread 19593 for more information
newly created elements
- The fix i've put in is basically the same as what DataTables 1.9-
used. I had tried to opitmise it a little, but it wasn't working for
newly created cells. I still think this can be optimised, but for the
moment, this is at least allows it to work.
and result set for the plural methods.
Fix: Row details events were itterating over non-DataTables rows
creating a Javascript error
Fix: Example - Server-side processing row details example updated to be
able to restore the details row on a redraw.
Update: Documentation - Most examples which used `flatten()` are more
correct to use the new `eq()` method, so they have been updated.
- This set of changes is based on the discussion in thread 19377. While
working on the fix, I realised that the use of flatten() is too broad,
so the new `eq()` function is introduced. It is similar to the jQuery
eq() method in that it reduces the instance to just the selected
index, although in DataTables this is both the context and the result
set. Its a small addition, but I think it will provide to be very
useful
DataTables which character is used as a decimal place in the table's
data, so that number which are formatted using characters other than a
dot as the decimal place can be correctly detected and sorted.
- A large part of the world uses the comma as a decimal place, so it
makes sense to have this option built-in directly to DataTables,
rather than needing to use plu-in sorting types as before:
http://en.wikipedia.org/wiki/Decimal_mark
- However, the decimal place character cannot be detected automatically
since there are far to many ambiguities. As such, a new
`language.decimal` option is defined which is passed through to the
type detection functions. The type detection functions can then use
that character to alter their detection functions to transform numbers
into the dot formatted equivilent for parsing in Javascript.
- The numeric sorting methods have been bundled together in the function
`_addNumericSort` which is called when a character is given for the
decimal mark, adding the sorting functions required specifically for
that mark. This means that any character at all can be added, while
keeping the table's sort performance as it was.
- Code size in increased a little for this new feature, but a lot of
work has been done to keep it to a minimum (while still optimising for
the most common use case of a dot decimal place), and this is a good
feature to have in DataTables' core code.
- All required documentation added and updated.
- Special thanks to Tobias Bäthge for suggesting and sponsoring this
feature.
- This is caused due to different content in the displayed header and
the size forcing header in the body scrolling table. The browsers can
lay the two tables out differently even although the widths applied
are identical, due to the different content.
- The fix is to keep the content in the scroll body header, but hide it
by wrapping in a div which has height 0 and overflow hidden
- See thread 19311 for more information
server-side processing
- A popular plug-in for DataTables is the `fnSetFilteringDelay` plug-in,
which provides a bit of a buffer when typing into the filter input so
you don't make an Ajax request for every key stroke - i.e. don't DDoS
your own server!
- Since we have _fnThrottle built in now for the scrolling, we can also
use it to provide this buffering functionality for server-side
processing filtering in the core. A couple of small changes for
_fnThrottle were required to get the callback context correct and ot
call it not immediately, but only after the delay
footer
Update: Update CSS to display the table border properly when there is no
footer when scrolling
Dev: Update the _fnAddOptionsHtml function to be smaller in code size.
Identical functionality, just smaller code