Disable Row details icon for some rows
Disable Row details icon for some rows

I need to disable detail icon if table json data contains speacial property for a country.
Example
'data' =>
[
[
'r_region' => 'Europe',
'r_country_url' => 'spain',
],
[
'r_region' => 'Europe',
'r_country_url' => 'france',
'r_online' => 'none',
],
]
So here if France has r_online property I need to set some css for this icon.
I use this code for this column with icons
{
"class": 'details-online',
"orderable": false,
"data": null,
"defaultContent": '',
"mRender": function ( data, type, full) {
for(var k in data) {
if (k == 'r_online'){
//console.log(k, data[k],);
$("td.details-online").css({ color: 'red', cursor: 'default' });
$('td.details-online').click(function(){return false;});
}
}
},
},
But this code adds this css for all icons only on the first page.
Is there any solution for this?
This discussion has been closed.
Replies
I managed to solve this problem with this line of code
text.replace(); function is not needed here.