MCPcopy Create free account
hub / github.com/blockstrap/framework / _fnGetCellData

Function _fnGetCellData

blockstrap/js/dependencies/tables.js:1044–1078  ·  view source on GitHub ↗

* Get the data for a given cell from the internal cache, taking into account data mapping * @param {object} oSettings dataTables settings object * @param {int} iRow aoData row id * @param {int} iCol Column index * @param {string} sSpecific data get type ('display', 'type' 'filter' 'sort'

( oSettings, iRow, iCol, sSpecific )

Source from the content-addressed store, hash-verified

1042 * @memberof DataTable#oApi
1043 */
1044 function _fnGetCellData( oSettings, iRow, iCol, sSpecific )
1045 {
1046 var oCol = oSettings.aoColumns[iCol];
1047 var oData = oSettings.aoData[iRow]._aData;
1048 var sData = oCol.fnGetData( oData, sSpecific );
1049
1050 if ( sData === undefined )
1051 {
1052 if ( oSettings.iDrawError != oSettings.iDraw && oCol.sDefaultContent === null )
1053 {
1054 _fnLog( oSettings, 0, "Requested unknown parameter "+
1055 (typeof oCol.mData=='function' ? '{function}' : "'"+oCol.mData+"'")+
1056 " for row "+iRow, 4 );
1057 oSettings.iDrawError = oSettings.iDraw;
1058 }
1059 return oCol.sDefaultContent;
1060 }
1061
1062 /* When the data source is null, we can use default column data */
1063 if ( (sData === oData || sData === null) && oCol.sDefaultContent !== null )
1064 {
1065 sData = oCol.sDefaultContent;
1066 }
1067 else if ( typeof sData === 'function' )
1068 {
1069 // If the data source is a function, then we run it and use the return
1070 return sData();
1071 }
1072
1073 if ( sData === null && sSpecific == 'display' )
1074 {
1075 return '';
1076 }
1077 return sData;
1078 }
1079
1080
1081 /**

Callers 9

_fnColumnTypesFunction · 0.85
_fnAddDataFunction · 0.85
_fnInvalidateRowFunction · 0.85
_fnCreateTrFunction · 0.85
_fnFilterDataFunction · 0.85
_fnGetWidestNodeFunction · 0.85
_fnGetMaxLenStringFunction · 0.85
_fnSortDataFunction · 0.85
tables.jsFile · 0.85

Calls 1

_fnLogFunction · 0.85

Tested by

no test coverage detected