|
|
|
@ -475,7 +475,7 @@ class Dataset {
|
|
|
|
|
this._byKeys = {};
|
|
|
|
|
this._current = null;
|
|
|
|
|
|
|
|
|
|
let data = this._getDataItems(obj);
|
|
|
|
|
let data = this._getDataItems(obj = obj || {});
|
|
|
|
|
this._items = data.items;
|
|
|
|
|
this._byKeys = data.byKeys;
|
|
|
|
|
/*
|
|
|
|
@ -498,7 +498,6 @@ class Dataset {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_getDataItems(obj) {
|
|
|
|
|
obj = obj || {};
|
|
|
|
|
let array = Array.isArray(obj) ? obj : this.conf.dataGetter(obj) || [];
|
|
|
|
|
if (!Array.isArray(array))
|
|
|
|
|
throw new Error("The data must be an array");
|
|
|
|
@ -533,7 +532,7 @@ class Dataset {
|
|
|
|
|
return this.setData(obj);
|
|
|
|
|
|
|
|
|
|
let state = this.state;
|
|
|
|
|
let data = this._getDataItems(obj);
|
|
|
|
|
let data = this._getDataItems(obj = obj || {});
|
|
|
|
|
this._items = this._items.concat(data.items);
|
|
|
|
|
this._byKeys = {
|
|
|
|
|
...this._byKeys,
|
|
|
|
|