JSFiddle - React, Tailwind, and code Playground
by fuggfuggfugg
HTML
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/2.1.6/js/dataTables.js"></script>
<script src="https://cdn.datatables.net/scroller/2.4.3/js/dataTables.scroller.js"></script>
<script src="https://cdn.datatables.net/scroller/2.4.3/js/scroller.dataTables.js"></script>
<table id="example" class="display nowrap" style="width:100%">
<thead>
<tr>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
<th>ZIP / Post code</th>
<th>Country</th>
</tr>
</thead>
</table>
JavaScript
let data = [];
for (let i = 0; i < 50000; i++) {
data.push([i, i, i, i, i]);
}
new DataTable('#example', {
data: data,
scrollCollapse: true,
scroller: true,
scrollY: 200
});