From 964b0c23418683f270ed4401689351a5f08eee60 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 9 Jul 2024 12:25:57 +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 | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/resources/js/base/dataset.js b/src/main/webapp/resources/js/base/dataset.js index 6d05214..4fce267 100644 --- a/src/main/webapp/resources/js/base/dataset.js +++ b/src/main/webapp/resources/js/base/dataset.js @@ -1318,8 +1318,21 @@ class DatasetControl { }); } - reload(prev) { - this._load(this.dataset.state, prev); + reload(option) { + let all = option ? option.all : false, + prev = option ? option.prev : false, + state = this.dataset.state; + + if (!all) { + this._load(state, prev); + } else { + let query = Object.assign(this.query, {}), + state = this.dataset.state; + this.query.fetchSize = this.dataset.length; + this.query.pageNum = 1; + this._load(state); + this.query = query; + } } download(type) { @@ -1455,7 +1468,7 @@ class DatasetControl { onRemove(selected, resp) { if (resp.saved) - this.reload(selected.length == this.dataset.length); + this.reload({prev: selected.length == this.dataset.length}); } _selector(selector) {