JSFiddle - React, Tailwind, and code Playground
HTML
<html lang="en">
<head>
<!-- Stylesheets -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/datetime/1.1.1/css/dataTables.dateTime.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.9/css/responsive.bootstrap4.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/rowgroup/1.1.3/css/rowGroup.bootstrap4.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.3.3/css/select.bootstrap4.min.css"/>
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/datetime/1.1.1/js/dataTables.dateTime.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.9/js/responsive.bootstrap4.js"></script>
<script type="text/javascript"...
CSS
tr.selected {
background-color: #acbad5;
}
h1 {
text-align: center;
}
h5{
text-align: center;
font-size: 40px;
}
.dataTable > thead > tr > th[class*="sort"]:before, .dataTable > thead > tr > th[class*="sort"]:after {
content: "" !important;
}
.right {
float: right;
}
.toolbar{
float: left;
}
.FilterStuff>div{
float:none;
}
.dataTables_wrapper .FilterStuff .dataTables_filter {
float:left
}
.title {
position: relative;
background-color: lightgrey;
color: #fff;
border-radius: 0px;
padding: 20px;
font-size: 150%;
border: 1px solid black;
}
.btn{
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
color: #333333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
cursor: pointer;
background-color: #f5f5f5;
border: 1px solid #B7DDF2;
}
.table th {
text-align: center;
}
.table td{
padding: 10px;
}
.dtrg-level-0::after {
text-align: center;
}
table.dataTable tbody td.select-checkbox,
table.dataTable thead th.select-checkbox {
position: relative;
}
table.dataTable tbody td.select-checkbox:before,
table.dataTable tbody td.select-checkbox:after,
table.dataTable thead th.select-checkbox:before,
table.dataTable thead th.select-checkbox:after {
display: block;
position: absolute;
top: 1.2em;
left: 50%;
width: 12px;
height: 12px;
box-sizing: border-box;
}
table.dataTable tbody td.select-checkbox:before,
table.dataTable thead th.select-checkbox:before {
content: ' ';
margin-top: -6px;
margin-left: -6px;
border: 1px solid black;
border-radius: 3px;
}
.btn:hover{
color: #333333;
background-color: #e6e6e6;
}
th {
font-size: 14px;
}
td {
font-size: 12px;
text-align: center;
}
div.container {
min-width: 980px;
margin: 0 auto;
}
body {
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana,...
JavaScript
var data = [
{
"AssignedTo" : "Beerus Dev",
"Status": "In Progress",
"Priority": "(1) High",
"TaskTitle": "Create the Task List",
"StartDate": "08/20/2021",
"EndDate": "08/27/2021",
"PercentageComplete": "23%",
"AssignedToId" : 32
},
{
"AssignedTo" : "Beerus Dev",
"Status": "In Progress",
"Priority": "(1) High",
"TaskTitle": "Figure Out Data Not Saving",
"StartDate": "08/20/2021",
"EndDate": "08/27/2021",
"PercentageComplete": "23%",
"AssignedToId" : 32
},
{
"AssignedTo" : "Krillin Dev",
"Status": "Not Started",
"Priority": "(2) Normal",
"TaskTitle": "Create the Task List",
"StartDate": "08/20/2021",
"EndDate": "08/27/2021",
"PercentageComplete": "23%",
"AssignedToId" : 24
},
{
"AssignedTo" : "Krillin Dev",
"Status": "In Progress",
"Priority": "(1) High",
"TaskTitle": "Finish Security Training",
"StartDate": "08/20/2021",
"EndDate": "08/27/2021",
"PercentageComplete": "15%",
"AssignedToId" : 24
}
];
$(document).ready( function() {
var thisUserID = 32;
$.fn.dataTable.ext.search.push(
function(settings, searchData, index, rowData, counter) {
//var tableUserId = searchData[8];
var tableUserId = searchData[7];
var api = $.fn.dataTable.Api('#taskTable');
//var api = $.fn.dataTable.Api('#completedTaskTable');
console.log(thisUserID, tableUserId, thisUserID == tableUserId)
if(thisUserID == tableUserId) {
return true;
}
return false;
}
);
function filterGlobal () {
...