Skip to content

Commit d8850a2

Browse files
committed
Fix issue with empty table and TR. Changed to use header to calculate count of columns
1 parent d98aab5 commit d8850a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/hospital/js/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Call the dataTables jQuery plugin
22
$(document).ready(function() {
33
$('#patientHistoryTable').DataTable({
4-
'order': [[ $("#patientHistoryTable > tbody > tr:first > td").length - 1, "desc" ]],
4+
'order': [[ $("#patientHistoryTable > tbody > th > td").length - 1, "desc" ]],
55
'language': {
66
'url': "//cdn.datatables.net/plug-ins/1.10.16/i18n/Russian.json"
77
},

0 commit comments

Comments
 (0)