DatasetControl.reload(..) 수정

master
mjkhan21 4 months ago
parent 26e76aa952
commit a4725ea23b

@ -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;});
}
}

Loading…
Cancel
Save