JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://cdn.datatables.net/1.10.3/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="http://cdn.datatables.net/1.10.3/css/jquery.dataTables.css">
<div class="toolbar-buttons">
    <button type="button" class="up">UP</button>
    <button type="button" class="down">DOWN</button>
</div>

<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </thead>
 
        <tfoot>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Start date</th>
                <th>Salary</th>
            </tr>
        </tfoot>
 
        <tbody>
            <tr id="1">
                <td>1</td>
                <td>Tiger Nixon</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                <td>2011/04/25</td>
                <td>$320,800</td>
            </tr>
            <tr id="2">
                <td>2</td>
                <td>Garrett Winters</td>
                <td>Accountant</td>
                <td>Tokyo</td>
                <td>63</td>
                <td>2011/07/25</td>
                <td>$170,750</td>
            </tr>
            <tr id="3">
                <td>3</td>
                <td>Ashton Cox</td>
                <td>Junior Technical Author</td>
                <td>San Francisco</td>
                <td>66</td>
                <td>2009/01/12</td>
                <td>$86,000</td>
            </tr>
            <tr id="4">
                <td>4</td>
                <td>Cedric Kelly</td>
                <td>Senior Javascript Developer</td>
               ...

CSS

.toolbar-buttons{
  margin-bottom: 32px;
}

JavaScript

$(document).ready(function() {
    $('#example').DataTable();
    
    /* select row and enable edit & delete buttons */
	$('#example').delegate('tr', 'click', function (e) {
		$(this).addClass('selected').siblings().removeClass('selected');
	});
    
    /* get row id */
	$('#example').on('click','td',function (e) {
		var id = $(this).closest('tr').attr('id');
		window.id = id;
	});
} );