From 0fbed66f427257c41275937dba3bf0bc7acca9ac Mon Sep 17 00:00:00 2001 From: Pankaj Jain Date: Sat, 18 Apr 2020 13:03:35 +0530 Subject: [PATCH] fix limit filter --- README.md | 4 ++-- table.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 54c8870..eb0b2fd 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Bootstrap # CDN - - + + # How to use diff --git a/table.js b/table.js index cb3294e..bf0c7d2 100644 --- a/table.js +++ b/table.js @@ -32,10 +32,14 @@ class DynamicTable { let { addFilter, addLimit } = this.paramObject; this._addTableDataRows(); if (addFilter) { - this.filterNode.onkeyup = this._addTableDataRows; + this.filterNode.onkeyup = () => { + this._addTableDataRows(); + } } if (addLimit) { - this.limitNode.onchange = this._addTableDataRows; + this.limitNode.onchange = () => { + this._addTableDataRows(); + } } }