@onehat/data 1.22.20 → 1.22.23
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
package/src/Repository/Ajax.js
CHANGED
|
@@ -367,6 +367,19 @@ class AjaxRepository extends Repository {
|
|
|
367
367
|
return convertedConditions;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Returns current value of any param query conditions
|
|
372
|
+
*/
|
|
373
|
+
getParamConditions() {
|
|
374
|
+
const
|
|
375
|
+
existingConditions = this._params.conditions || {},
|
|
376
|
+
convertedConditions = {};
|
|
377
|
+
_.each(existingConditions, (value, key) => {
|
|
378
|
+
convertedConditions['conditions[' + key + ']'] = value;
|
|
379
|
+
});
|
|
380
|
+
return convertedConditions;
|
|
381
|
+
}
|
|
382
|
+
|
|
370
383
|
/**
|
|
371
384
|
* Determines if query param exists
|
|
372
385
|
* @param {string} name - Param name
|
|
@@ -201,7 +201,7 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
if (this.isAutoLoad && this.isLoaded && !this.eventsPaused) {
|
|
204
|
+
if ((this.isAutoLoad || this.isTree) && this.isLoaded && !this.eventsPaused) {
|
|
205
205
|
if (this.isTree) {
|
|
206
206
|
return this.loadRootNodes(1);
|
|
207
207
|
} else {
|
|
@@ -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
|
*/
|
package/src/Repository/Tree.js
CHANGED
|
@@ -114,7 +114,6 @@ class TreeRepository extends OneBuildRepository {
|
|
|
114
114
|
this._setPaginationVars();
|
|
115
115
|
|
|
116
116
|
this.markLoaded();
|
|
117
|
-
this.areRootNodesLoaded = true;
|
|
118
117
|
|
|
119
118
|
|
|
120
119
|
// Don't emit events for root nodes...
|
|
@@ -207,6 +206,8 @@ class TreeRepository extends OneBuildRepository {
|
|
|
207
206
|
this._setPaginationVars();
|
|
208
207
|
}
|
|
209
208
|
|
|
209
|
+
this.markLoaded();
|
|
210
|
+
|
|
210
211
|
this.rehash();
|
|
211
212
|
// this.emit('changeData', this.entities);
|
|
212
213
|
this.emit('load', this);
|