From a4725ea23bff507e15f6fe0dcfc4a67c0b06f590 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 9 Jul 2024 13:03:20 +0900 Subject: [PATCH] =?UTF-8?q?DatasetControl.reload(..)=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/resources/js/base/dataset.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/resources/js/base/dataset.js b/src/main/webapp/resources/js/base/dataset.js index 7bf1782..2c141a0 100644 --- a/src/main/webapp/resources/js/base/dataset.js +++ b/src/main/webapp/resources/js/base/dataset.js @@ -1297,7 +1297,7 @@ class DatasetControl { this._load(); } - _load(state, prev) { + _load(state, prev, callback) { if (!this.query.pageNum) this.query.pageNum = 1; if (prev) @@ -1308,12 +1308,14 @@ class DatasetControl { data:this.query, success:resp => { if (!prev) - resp.state = state; + resp.state = state; if (!this.appendData || this.query.pageNum == 1) this.setData(resp); else { this.addData(resp); } + if (callback) + callback(); } }); } @@ -1331,8 +1333,7 @@ class DatasetControl { this.query.fetchSize = this.dataset.length; this.query.pageNum = 1; this.dataset.clear(); - this._load(state); - this.query = query; + this._load(state, prev, () => {this.query = query;}); } }