fix broken sort

integration-tests
Josha von Gizycki 5 years ago
parent 3a47918867
commit 6fc5723a71

@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function () {
} }
function flipSortDir(dir) { function flipSortDir(dir) {
return (dir || 'asc') == 'asc' ? 'desc' : 'asc' return (dir || 'asc') === 'asc' ? 'desc' : 'asc'
} }
function clearSortAttributes(tbl) { function clearSortAttributes(tbl) {
@ -240,7 +240,7 @@ document.addEventListener('DOMContentLoaded', function () {
console.debug(tbl, ix, event) console.debug(tbl, ix, event)
const sortDir = event.target.getAttribute('data-sort') || 'asc' const sortDir = event.target.getAttribute('data-sort') || 'asc'
const sortMod = sortDir == 'asc' ? 1 : -1; const sortMod = sortDir === 'asc' ? -1 : 1;
const rows = tblRows(tbl) const rows = tblRows(tbl)
const newTbody = document.createElement('tbody') const newTbody = document.createElement('tbody')

Loading…
Cancel
Save