@onehat/data 1.22.19 → 1.22.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.22.19",
3
+ "version": "1.22.21",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -535,7 +535,7 @@ class AjaxRepository extends Repository {
535
535
 
536
536
  const repository = this;
537
537
 
538
- return this._send(this.methods.get, url, data, { isLoadRequest: true, requestKey, })
538
+ return this._send(this.methods.get, url, data, { isLoadRequest: true, requestKey, })
539
539
  .then(result => {
540
540
  if (this.debugMode) {
541
541
  console.log('Response for ' + this.name, result);
@@ -256,11 +256,6 @@ export default class Repository extends EventEmitter {
256
256
  */
257
257
  this.lastLoaded = null;
258
258
 
259
- /**
260
- * @member {boolean} areRootNodesLoaded - State: whether or not root nodes have been loaded at least once
261
- */
262
- this.areRootNodesLoaded = false;
263
-
264
259
  /**
265
260
  * @member {boolean} isSaving - State: whether or not entities are currently being saved
266
261
  */
@@ -113,7 +113,7 @@ class TreeRepository extends OneBuildRepository {
113
113
  this.total = total;
114
114
  this._setPaginationVars();
115
115
 
116
- this.areRootNodesLoaded = true;
116
+ this.markLoaded();
117
117
 
118
118
 
119
119
  // Don't emit events for root nodes...
@@ -206,6 +206,8 @@ class TreeRepository extends OneBuildRepository {
206
206
  this._setPaginationVars();
207
207
  }
208
208
 
209
+ this.markLoaded();
210
+
209
211
  this.rehash();
210
212
  // this.emit('changeData', this.entities);
211
213
  this.emit('load', this);