1
0
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:
Allan Jardine 2011-09-10 09:12:23 +01:00
parent 1d2db4d5e9
commit 5f82b240bc

View File

@ -6681,6 +6681,11 @@
{
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 )
{