Skip to content

Commit

Permalink
Fix: dt-init createdCell cellData prarameter now passes in the orig…
Browse files Browse the repository at this point in the history
…inal data for the cell

* This reverts the last commit which documented the old behaviour.
  Thinking again about it, if you want to modify the rendered data use
  `$(cell).html()`.
  • Loading branch information
Allan Jardine committed Jul 11, 2014
1 parent c722699 commit c444c66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/option/columns.createdCell.xml
Expand Up @@ -10,7 +10,7 @@
The `tag TD` node that has been created
</parameter>
<parameter type="node" name="cellData">
The data that will be displayed in the cell. If you use `dt-init columns.render` to modify the data, the modified data will be given here. If you need to access the raw data, use the `rowData` parameter for this function.
Cell data. If you use `dt-init columns.render` to modify the data, use `$(cell).html()` to get and modify the rendered data. The information given here is the original and unmodified data from the data source.
</parameter>
<parameter type="node" name="rowData">
Data source object / array for the whole row
Expand Down
2 changes: 1 addition & 1 deletion js/core/core.draw.js
Expand Up @@ -65,7 +65,7 @@ function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
if ( oCol.fnCreatedCell )
{
oCol.fnCreatedCell.call( oSettings.oInstance,
nTd, _fnGetCellData( oSettings, iRow, i, 'display' ), rowData, iRow, i
nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i
);
}
}
Expand Down

0 comments on commit c444c66

Please sign in to comment.