1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Update: Fully deprecate fnRender - it will be removed from the next major version of DataTables and it is strongly adviced that you do not use it!

This commit is contained in:
Allan Jardine 2012-09-09 12:26:57 +01:00
parent f6401f062a
commit df614240cf
3 changed files with 66 additions and 174 deletions

View File

@ -7584,14 +7584,14 @@
"bSortable": null,
/**
* When using fnRender, you have two options for what to do with the data,
* and this property serves as the switch. Firstly, you can have the sorting
* and filtering use the rendered value (true - default), or you can have
* the sorting and filtering us the original value (false).
*
* *NOTE* It is it is advisable now to use mData as a function and make
* use of the 'type' that it gives, allowing (potentially) different data to
* be used for sorting, filtering, display and type detection.
* <code>Deprecated</code> When using fnRender, you have two options for what
* to do with the data, and this property serves as the switch. Firstly, you
* can have the sorting and filtering use the rendered value (true - default),
* or you can have the sorting and filtering us the original value (false).
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @deprecated
*/
@ -7614,9 +7614,9 @@
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@ -7643,8 +7643,12 @@
"fnGetData": null,
/**
* Custom display function that will be called for the display of each cell
* in this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@ -7653,6 +7657,7 @@
* @param {object} o.oSettings The settings object for this DataTables instance
* @returns {string} The string you which to use in the display
* @default null
* @deprecated
*/
"fnRender": null,
@ -9888,51 +9893,18 @@
/**
* When using fnRender() for a column, you may wish to use the original data
* (before rendering) for sorting and filtering (the default is to used the
* rendered data that the user can see). This may be useful for dates etc.
* <code>Deprecated</code> When using fnRender() for a column, you may wish
* to use the original data (before rendering) for sorting and filtering
* (the default is to used the rendered data that the user can see). This
* may be useful for dates etc.
*
* *NOTE* This property is now deprecated, and it is suggested that you use
* mData and / or mRender to render data for the DataTable.
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @default true
* @dtopt Columns
* @deprecated
*
* @example
* // Using aoColumnDefs
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false,
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false
* },
* null,
* null,
* null,
* null
* ]
* } );
* } );
*/
"bUseRendered": true,
@ -9970,9 +9942,9 @@
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@ -9999,8 +9971,12 @@
/**
* Custom display function that will be called for the display of each cell in
* this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@ -10011,37 +9987,7 @@
* @param {*} val The current cell value
* @returns {string} The string you which to use in the display
* @dtopt Columns
*
* @example
* // Using aoColumnDefs
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* },
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* } },
* null,
* null,
* null,
* null
* ]
* } );
* } );
* @deprecated
*/
"fnRender": null,

View File

@ -48,14 +48,14 @@ DataTable.models.oColumn = {
"bSortable": null,
/**
* When using fnRender, you have two options for what to do with the data,
* and this property serves as the switch. Firstly, you can have the sorting
* and filtering use the rendered value (true - default), or you can have
* the sorting and filtering us the original value (false).
*
* *NOTE* It is it is advisable now to use mData as a function and make
* use of the 'type' that it gives, allowing (potentially) different data to
* be used for sorting, filtering, display and type detection.
* <code>Deprecated</code> When using fnRender, you have two options for what
* to do with the data, and this property serves as the switch. Firstly, you
* can have the sorting and filtering use the rendered value (true - default),
* or you can have the sorting and filtering us the original value (false).
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @deprecated
*/
@ -78,9 +78,9 @@ DataTable.models.oColumn = {
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@ -107,8 +107,12 @@ DataTable.models.oColumn = {
"fnGetData": null,
/**
* Custom display function that will be called for the display of each cell
* in this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@ -117,6 +121,7 @@ DataTable.models.oColumn = {
* @param {object} o.oSettings The settings object for this DataTables instance
* @returns {string} The string you which to use in the display
* @default null
* @deprecated
*/
"fnRender": null,

View File

@ -142,51 +142,18 @@ DataTable.defaults.columns = {
/**
* When using fnRender() for a column, you may wish to use the original data
* (before rendering) for sorting and filtering (the default is to used the
* rendered data that the user can see). This may be useful for dates etc.
* <code>Deprecated</code> When using fnRender() for a column, you may wish
* to use the original data (before rendering) for sorting and filtering
* (the default is to used the rendered data that the user can see). This
* may be useful for dates etc.
*
* *NOTE* This property is now deprecated, and it is suggested that you use
* mData and / or mRender to render data for the DataTable.
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type boolean
* @default true
* @dtopt Columns
* @deprecated
*
* @example
* // Using aoColumnDefs
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false,
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* {
* "fnRender": function ( oObj ) {
* return oObj.aData[0] +' '+ oObj.aData[3];
* },
* "bUseRendered": false
* },
* null,
* null,
* null,
* null
* ]
* } );
* } );
*/
"bUseRendered": true,
@ -224,9 +191,9 @@ DataTable.defaults.columns = {
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to fnRender
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
* allowing you to modify the DOM element (add background colour for example) when the
* element is available (since it is not when fnRender is called).
* element is available.
* @type function
* @param {element} nTd The TD node that has been created
* @param {*} sData The Data for the cell
@ -253,8 +220,12 @@ DataTable.defaults.columns = {
/**
* Custom display function that will be called for the display of each cell in
* this column.
* <code>Deprecated</code> Custom display function that will be called for the
* display of each cell in this column.
*
* Please note that this option has now been deprecated and will be removed
* in the next version of DataTables. Please use mRender / mData rather than
* fnRender.
* @type function
* @param {object} o Object with the following parameters:
* @param {int} o.iDataRow The row in aoData
@ -265,37 +236,7 @@ DataTable.defaults.columns = {
* @param {*} val The current cell value
* @returns {string} The string you which to use in the display
* @dtopt Columns
*
* @example
* // Using aoColumnDefs
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumnDefs": [
* {
* "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* },
* "aTargets": [ 0 ]
* }
* ]
* } );
* } );
*
* @example
* // Using aoColumns
* $(document).ready( function() {
* $('#example').dataTable( {
* "aoColumns": [
* { "fnRender": function ( o, val ) {
* return o.aData[0] +' '+ o.aData[3];
* } },
* null,
* null,
* null,
* null
* ]
* } );
* } );
* @deprecated
*/
"fnRender": null,