JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.9/js/jquery.dataTables.js"></script>
<script src="https://cdn.datatables.net/fixedcolumns/3.1.0/js/dataTables.fixedColumns.min.js"></script>
<script src="https://cdn.rawgit.com/ashl1/datatables-rowsgroup/v1.0.1/dataTables.rowsGroup.js"></script>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<link href="//datatables.net/download/build/nightly/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script src="//datatables.net/download/build/nightly/jquery.dataTables.js"></script>
<script src="//cdn.rawgit.com/ashl1/datatables-rowsgroup/v1.0.0/dataTables.rowsGroup.js"></script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<div class="container">
<table id="example" class="display" width="100%">
</table>
</div>
</body>
</html>
CSS
body {
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
div.container {
min-width: 980px;
margin: 0 auto;
}
JavaScript
$(document).ready(function() {
var data = [
['15.08.2018', 'Group1', 'YES', 'ElementN', '2Element N'],
['15.08.2018', 'Group2', 'YES', 'Element1', '2Element 1'],
['15.08.2018', 'Group1', 'YES', 'Element1', '2Element 1'],
['16.08.2018', 'Group2', 'sub-subgroup1', 'Element2', '2Element 2'],
['16.08.2018', 'Group2', 'sub-subgroup1', 'Element2', '2Element 2'],
['16.08.2018', 'Group2', 'sub-subgroup1', 'Element2', '2Element 2'],
];
var table = $('#example').DataTable({
columns: [{
name: 'second',
title: 'First group',
}, {
title: 'Second group',
}, {
title: 'Third group',
}, {
title: 'Forth ungrouped',
}, {
title: 'Fifth ungrouped',
}, ],
data: data,
rowsGroup: [ // Always the array (!) of the column-selectors in specified order to which rows groupping is applied
// (column-selector could be any of specified in https://datatables.net/reference/type/column-selector)
'second:name',
0,
],
pageLength: '20',
});
});