JSFiddle - React, Tailwind, and code Playground

by Serg Kap

HTML

<table id="table_id" class="display">
				<thead>
					<tr>
					<th>Repr</th>
						<th><fmt:message key="table.order.id" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.description" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.max.load.height" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.max.load.width" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.max.load.length" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.weight" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.volume" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.date.departure" bundle="${loc}" /></th>
						<th><fmt:message key="table.order.date.arrival" bundle="${loc}" /></th>
						<th>Пункт прибытия</th>
						<th>Пункт отбытия</th>
						<th><fmt:message key="table.order.status" bundle="${loc}" /></th>
						
					</tr>
				</thead>
				<tbody>
				</tbody>

JavaScript

$(document).ready(function() {
		$('#table_id').DataTable({
// 		"processing": true,
//         "serverSide": true,
        "ajax": {
            "url": $("#show_all_orders").attr('action'),
//             "ordering":false,
//             




 "dataSrc": function ( json ) {
      console.log(json.data[0].statusRepr)
      
      return json.data;
    },

{"recordsTotal":22,"recordsFiltered":22,"data":[{"statusRepr":"registered","id":44,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1, 2010","departurePoint":"Ожерелье","arrivalPoint":"Москва","status":"REGISTERED"},{"statusRepr":"registered","id":43,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1, 2010","departurePoint":"Ожерелье","arrivalPoint":"Москва","status":"REGISTERED"},{"statusRepr":"registered","id":38,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1, 2010","departurePoint":"Ожерелье","arrivalPoint":"Москва","status":"REGISTERED"},{"statusRepr":"registered","id":37,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1, 2010","departurePoint":"Ожерелье","arrivalPoint":"Москва","status":"REGISTERED"},{"statusRepr":"registered","id":36,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1, 2010","departurePoint":"Ожерелье","arrivalPoint":"Москва","status":"REGISTERED"},{"statusRepr":"registered","id":35,"description":"dsaf","maxLoadHeight":1,"maxLoadWidth":1,"maxLoadLength":1,"weight":1,"volume":1,"departureDate":"янв 1, 2008","arrivalDate":"янв 1,...