DataTables 1.9.3

DataTables CDN files for DataTables 1.9.3. This software was originally released on 9th August, 2012.

Release notes

I'm excited to announce that DataTables 1.9.3 is now available. Although this is a minor release of DataTables it is none-the-less important for the bug fixes that it includes and also one important new feature - mRender .

mRender is the compliment of the mData option (renamed in this release from mDataProp - this is a backwards compatible change! You can still use mDataProp, the reason for the renaming is for naming consistency and flexibility). mRender will be the subject of a blog post shortly, so I'll only summarise its abilities here, but basically it can replace fnRender with something that has far more ability.

mData, as described in this blog post, , can be used to provide DataTables with different data for each cell data type, however, it has the added complication of needed to work with setting the data value - sometimes this can be useful, but often it just requires extra code. mRender does not need to consider the setting of data, just returning the data required for each type. This can take the form of a string or a function, just like mData and will use the value pointed to by mData and its base value (although it does have access to the full data source object if needed).

In addition to this the mData / mRender syntax as been expanded to include array notation for dealing with nested arrays.

For more information see this form post.

  • New: xhr event now has the json returned from the server as the third parameter.
  • New: mRender option for columns - this is effectively a simpler version of mDataProp for reading data only (while mDataProp also sets data), and much more comprehensive than fnRender (as such fnRender is now officially deprecated). See the documentation comments in model.defaults.columns.js for further information on how to use mRender.
  • New: Renaming mDataProp to mData for naming consistency and to show its flexibility. Please note that this is a backwards compatible change! DataTables will automatically check for mDataProp on a column and use that if required (if both mData and mDataProp are given then the new mData is used in preference).
  • New: When making an Ajax call for data (fnServerData) and the server responds with the JSON parameter "sError" set, DataTables will alert this out. Typically end users should never see this - it is useful for error reporting from the server though.

  • Updated: Tidy up _fnColumnIndexToVisible and _fnVisibleToColumnIndex to use the new _fnGetColumns method.

  • Updated: Remove use of $.browser since this is depreciated in jQuery 1.8 and will be completely removed in jQuery 1.9. Instead we now use feature detection to determine if there is a browser bug with the width calculation of scrolling elements that needs to be worked around. This does unfortunately increase the code size a bit - it is either this or using user agent string detection (which is exactly what is being removed from jQuery).
  • Updated: mDataProp syntax now has the ability to accept array syntax (for example "access[].name" would get an array of the 'name' properties from the access property of the data source). This is exceptionally useful for manipulating arrays - however, you are very strongly advised not to use in in mDataProp itself, since when setting arrays, you will overwrite the old array (thus destroying any other properties that it already has!). Instead, see the new mRender property if you want to make use of this syntax for drawing the table.
  • Updated: Unit test updated for the mData name change from mDataProp. Note that a number of tests to test the backwards compatibility of mDataProp!
  • Updated: Unit tests for set functions
  • Updated - examples: Witht he change in name from mDataProp to mData, this change is now reflected in the examples to encourage mData usage (do remember that mDataProp will still work, but use of mData is encouraged).

  • Performance: Alter how _fnBuildSearchRow works to be much faster. For this a new method call _fnGetColumns is introduced which will pluck the column indexes that we want into an array that can then be iterated over (rather than spinning over the full aoColumns array twice, we now do it only the once for columns which are actually marked as searchable). Also use array join rather than string concatenation to keep the number of operations down as much as possible. The callers of _fnBuildSearchRow must now pass in the data to be searched, limited by the searchable flag (i.e. call _fnGetRowData with the column indexes from _fnGetColumns).

  • Fix: Remove dud CSS from themeroller file - 10794

  • Fix: Remove duplicate CSS lines - 10663
  • Fix: Use jQuery html() and text() for HTML data to search method. Much tidier and copes with strict XHTML - downside is that it is a little slower if & is in a data string.
  • Fix: When fnUpdate is called with a column index given, assume that the update is for an individual cell (which the API call has specified, so this is the correct thing to do). This also lets us tidy up some of the code in fnUpate, particularly when regarding deeply nested options.
  • Fix: #39 - null values should also be considered like undefined values when working with nested data and have properties created as needed.
  • Fix: null values that were applied to extended object properties were not being correctly applied since typeof null === 'object' - 11180
  • Fix - examples: typos in examples/api/multi_filter_select.html
  • Fix - documentation: Two syntax errors in the examples, one for fnStateSaveParams and the other mDataProp - 11083
  • Fix - documentation: Typos in documentation comments and source comments - 11083

  • New: fnSelectAll and fnSelectNone now have a single (optional) parameter that can be given to limit the [de]selection to only the rows which match the current filtering.

  • Update - examples: Update the plug-in button example to use the new TableTools.buttonBase object, extending that.

  • Fix: Typos in documentation comments and general code comments.

  • Fix: Collections were broken due to positioning misalignment - the new structure means that we can actually simplify the positioning a lot - simply make the buttons position:relative and then the flash container, since it is now inside those elements, position:absolute top:0 left:0 and only the height and width need be changed - 10721
  • Fix - examples: The DataTables web-site needs the formatting of the CSS includes to be @import rather than <link> in order to add its own styling.