JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/w/dt/dt-1.10.20/fh-3.1.6/fc-3.3.0/r-2.2.3/datatables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/w/dt/dt-1.10.20/fc-3.3.0/fh-3.1.6/r-2.2.3/datatables.min.css">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<div class="container">
<table id="example" class="display nowrap" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon <a>i</a></td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$3,120</td>
</tr>
<tr>
<td>Garrett Winters <a>i</a></td>
<td>Director</td>
<td>Edinburgh</td>
<td>63</td>
<td>2011/07/25</td>
<td>$5,300</td>
</tr>
<tr>
<td>Ashton Cox <a>i</a></td>
<td>Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$4,800</td>
</tr>
</tbody>
</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;
}
a {
color: white;
cursor: pointer;
border: 1px solid blue;
background: blue;
font-weight: bold;
border-radius: 50%;
display: inline-block;
width: 1em;
height: 1em;
text-align:center;
padding:0 .2em .4em;
}
JavaScript
$(document).ready( function () {
var table = $('#example').dataTable({responsive:true});
$('#example tbody').on("click", "td a", function(e) {
e.preventDefault();
e.stopPropagation();
alert("Modal");
return false;
});
});