JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https:////cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.7/css/jquery.dataTables.css">
<script src="http://momentjs.com/downloads/moment-with-locales.min.js"></script>
<table id = "dataTable" class = "display">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Target</th>
<th>Hits</th>
<th>Rate</th>
<th>%day</th>
<th>Start Date</th>
<th>End Date</th>
<th>Status</th>
</tr>
</thead>
<tr data-id = "1">
<td>1</td>
<td>Dej MMA Mars 2015</td>
<td>0</td>
<td>277</td>
<td>0%</td>
<td></td>
<td>1422399600</td>
<td>1454194800</td>
<td></td>
</tr>
<tr data-id = "2">
<td>2</td>
<td>Campagne de Test du Dej</td>
<td>0</td>
<td>163</td>
<td>0%</td>
<td></td>
<td>1425164400</td>
<td>1457839200</td>
<td></td>
</tr>
<tr data-id = "3">
<td>3</td>
<td>Test Campaign Not For Use on Demo</td>
<td>100</td>
<td>47</td>
<td>47%</td>
<td></td>
<td>1428530400</td>
<td>1428703200</td>
<td></td>
</tr>
<tr data-id = "4">
<td>4</td>
<td>Salon E-marketing 2015</td>
<td>0</td>
<td>435</td>
<td>0%</td>
<td></td>
<td>1428444000</td>
<td>1581462000</td>
<td></td>
</tr>
<tr data-id = "6">
<td>6</td>
<td>Demo 20/04/2015 - personalisation</td>
<td>0</td>
<td>41</td>
<td>0%</td>
<td></td>
<td>1429221600</td>
<td>1560290400</td>
<td></td>
</tr>
<tr data-id = "7">
<td>7</td>
<td>Demo 20/04/0215 - renvoi site</td>
<td>0</td>
<td>25</td>
<td>0%</td>
<td></td>
<td>1429221600</td>
<td>1528840800</td>
<td></td>
</tr>
</table>
JavaScript
$( '#dataTable' ).on( 'init.dt', function () {
//updateChart( camps );
} );
var table = $( '#dataTable' ).DataTable(
{
"dom" : '<"toolbar">ftp',
//"order" : [ [ 0, "desc" ] ],
"pagingType" : "full",
"scrollY" : "250px",
"scrollCollapse": false,
"columnDefs" : [
{
"targets": [ 0 ],
"visible": false
},
{
"render" : function ( data, type, row ) {
return "<a href='/campaign/view/" + row[ 0 ] + "'>" + data + "</a>";
},
"targets": [ 1 ]
},
{
"render" : function ( data, type, row ) {
var s =...