list: fix exception when typing in list filter fields

This commit is contained in:
Oliver Gerlich 2018-07-16 22:43:47 +02:00 committed by Geno
parent 485ecc13c6
commit 10a717f558
1 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,9 @@ export class ListView extends View {
this.nodeidFilter = domlib.newAt(cell2, 'input'); this.nodeidFilter = domlib.newAt(cell2, 'input');
this.nodeidFilter.setAttribute('placeholder', 'NodeID'); this.nodeidFilter.setAttribute('placeholder', 'NodeID');
this.nodeidFilter.setAttribute('size', '9'); this.nodeidFilter.setAttribute('size', '9');
this.nodeidFilter.addEventListener('keyup', this.render); this.nodeidFilter.addEventListener('keyup', () => {
this.render();
});
cell2.addEventListener('dblclick', () => { cell2.addEventListener('dblclick', () => {
this.sortTable(cell2); this.sortTable(cell2);
}); });
@ -55,7 +57,9 @@ export class ListView extends View {
cell3.classList.add('hostname'); cell3.classList.add('hostname');
this.hostnameFilter = domlib.newAt(cell3, 'input'); this.hostnameFilter = domlib.newAt(cell3, 'input');
this.hostnameFilter.setAttribute('placeholder', 'Hostname'); this.hostnameFilter.setAttribute('placeholder', 'Hostname');
this.hostnameFilter.addEventListener('keyup', this.render); this.hostnameFilter.addEventListener('keyup', () => {
this.render();
});
cell3.addEventListener('dblclick', () => { cell3.addEventListener('dblclick', () => {
this.sortTable(cell3); this.sortTable(cell3);
}); });