fixed a stupid bug breaking the sort of row numbers larger than 9

This commit is contained in:
tracer 2022-10-27 12:13:06 +02:00
parent e04cf94edd
commit 65a87acc48

View File

@ -109,12 +109,12 @@ function sortBy(column) {
for (let i = 1; i < (rows.length - 2); i++) { for (let i = 1; i < (rows.length - 2); i++) {
let x = rows[i] let x = rows[i]
let rowXId = x.id let rowXId = x.id
let rowXNumber = rowXId.charAt(rowXId.length -1) let rowXNumber = rowXId.match(/\d+/)
let valueX = document.getElementById(column + '_' + rowXNumber).value let valueX = document.getElementById(column + '_' + rowXNumber).value
let y = rows[i + 1] let y = rows[i + 1]
let rowYId = y.id let rowYId = y.id
let rowYNumber = rowYId.charAt(rowYId.length -1) let rowYNumber = rowYId.match(/\d+/)
let valueY = document.getElementById(column + '_' + rowYNumber).value let valueY = document.getElementById(column + '_' + rowYNumber).value
let currentSortOrder = document.getElementById(column + '_sort') let currentSortOrder = document.getElementById(column + '_sort')