Skip to content

Commit fed9a6f

Browse files
committed
LKE-1744 avoid error when showing/hiding columns
1 parent 2267cea commit fed9a6f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

public/js/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,11 @@ function filterTableColumns() {
462462
const list = document.getElementsByTagName('input');
463463
for (let i = 0; i < list.length; i++) {
464464
if (list[i].checked) {
465-
table.showColumn(list[i].id);
465+
// replace . by 'dot' to avoid bug in Tabulator
466+
table.showColumn(list[i].id.replace(/\./g, 'dot'));
466467
} else {
467-
table.hideColumn(list[i].id);
468+
// replace . by 'dot' to avoid bug in Tabulator
469+
table.hideColumn(list[i].id.replace(/\./g, 'dot'));
468470
}
469471
}
470472
closeModal();
@@ -516,7 +518,8 @@ function showModal() {
516518
modal.style.opacity = '1';
517519
const list = document.getElementsByTagName('input');
518520
for (let i = 0; i < list.length; i++) {
519-
list[i].checked = table.getColumn(list[i].id).getVisibility();
521+
// replace . by 'dot' to avoid bug in Tabulator
522+
list[i].checked = table.getColumn(list[i].id.replace(/\./g, 'dot')).getVisibility();
520523
}
521524
}
522525

0 commit comments

Comments
 (0)