mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
New: If a data source is found to be a function, then the function is executed and the return used for the cell display (+sorting, filtering etc). This is useful for integration with knockout.js and backbone.js etc.
This commit is contained in:
parent
1d2db4d5e9
commit
5f82b240bc
5
media/js/jquery.dataTables.js
vendored
5
media/js/jquery.dataTables.js
vendored
@ -6681,6 +6681,11 @@
|
|||||||
{
|
{
|
||||||
sData = oCol.sDefaultContent;
|
sData = oCol.sDefaultContent;
|
||||||
}
|
}
|
||||||
|
else if ( typeof sData == 'function' )
|
||||||
|
{
|
||||||
|
/* If the data source is a function, then we run it and use the return */
|
||||||
|
return sData();
|
||||||
|
}
|
||||||
|
|
||||||
if ( sSpecific == 'display' && sData === null )
|
if ( sSpecific == 'display' && sData === null )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user