From 224e7e0c20087c6622b1af41e909141e7806cbe2 Mon Sep 17 00:00:00 2001 From: Oliver Gerlich Date: Mon, 16 Jul 2018 22:43:47 +0200 Subject: [PATCH] list: fix exception when typing in list filter fields --- webroot/js/view/list.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webroot/js/view/list.js b/webroot/js/view/list.js index 8c38b51..a606b3b 100644 --- a/webroot/js/view/list.js +++ b/webroot/js/view/list.js @@ -40,7 +40,9 @@ export class ListView extends View { this.nodeidFilter = domlib.newAt(cell2, 'input'); this.nodeidFilter.setAttribute('placeholder', 'NodeID'); this.nodeidFilter.setAttribute('size', '9'); - this.nodeidFilter.addEventListener('keyup', this.render); + this.nodeidFilter.addEventListener('keyup', () => { + this.render(); + }); cell2.addEventListener('dblclick', () => { this.sortTable(cell2); }); @@ -57,7 +59,9 @@ export class ListView extends View { cell3.classList.add('hostname'); this.hostnameFilter = domlib.newAt(cell3, 'input'); this.hostnameFilter.setAttribute('placeholder', 'Hostname'); - this.hostnameFilter.addEventListener('keyup', this.render); + this.hostnameFilter.addEventListener('keyup', () => { + this.render(); + }); cell3.addEventListener('dblclick', () => { this.sortTable(cell3); });