1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-01 13:24:10 +01:00
DataTables/media
Allan Jardine 2bd643468b New: Extend render option to use objects allowing different data to be
used for the different data types very easily.

- Until now, if you want to use different data for the different data
  types (I've called these orthogonal data in relations to DataTables)
  you had to specify a function. That's fine, but it seems a rather
  clumsy way of just pulling different data out of a source object based
  on the type. This method allows the data types to be very easily
  defined with an object, allowing the same rules as `render` normally
  does (dotted object notation, array notation etc).

- For example:

    $(document).ready(function() {
    	$('#example').dataTable( {
    		columns: [
    			{ data: null, render: {
    				_: 'a',
    				sort: 'c',
    				type: 'c',
    				filter: 'd'
    			} },
    			{ data: 'b' }
    		],
    		data: [
    			{ 'a': 1, 'b': 2, 'c': 4, 'd': '1' },
    			{ 'a': 3, 'b': 4, 'c': 3, 'd': '3' },
    			{ 'a': 5, 'b': 6, 'c': 2, 'd': '5' },
    			{ 'a': 7, 'b': 8, 'c': 1, 'd': 'allan' }
    		]
    	} );
    } );
2013-03-02 18:53:27 +00:00
..
css Dev: Remove padding on code when in the syntax highlighter 2012-11-01 21:45:26 +00:00
images Update the sorting icon images. The old PNGs were really rather poor with what looked like 1bit transparency. 2011-12-20 14:45:05 +00:00
js New: Extend render option to use objects allowing different data to be 2013-03-02 18:53:27 +00:00
src New: Extend render option to use objects allowing different data to be 2013-03-02 18:53:27 +00:00
unit_testing Fix 151: Column type was being offset when columns were not searchable 2013-02-16 11:27:41 +00:00