columnDefs, targets and "createCell" bug in responsive mode.
columnDefs, targets and "createCell" bug in responsive mode.
On desktop the standard callback for "createCell" works just fine. But once in responsive mode the cellData is not being applied to the the newly created "dtr-data" span elements. What's the correct way to do callbacks in responsive mode on cellData ensuring that the "td" cell callback is also applied to the "dtr-data" when the child tr is opened?
currently this is what i have:
"columnDefs": [
{
targets: [ 4,5,6,7,8,9 ],
"createdCell": function (td, cellData, rowData, row, col) {
if ( cellData ==="y" ) {
$(td).html("<i class='ion-ios-checkmark-outline'></i>");
} else {
$(td).html("<i class='ion-ios-minus-empty'></i>");
}
}
}
]
This question has an accepted answers - jump to answer
Answers
My fix: duplicated createdCell callback in:-
"responsive": {
details: {
renderer: function ( api, rowIdx, columns ) {
The
responsive-display
event is the one that you would use for the responsive display.Allan