@onehat/data 1.16.1 → 1.16.2
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 +1 -1
- package/src/Repository/Ajax.js +10 -8
- package/src/Repository/OneBuild.js +8 -6
package/package.json
CHANGED
package/src/Repository/Ajax.js
CHANGED
|
@@ -306,7 +306,7 @@ class AjaxRepository extends Repository {
|
|
|
306
306
|
if (clearBase) {
|
|
307
307
|
this._baseParams = {};
|
|
308
308
|
}
|
|
309
|
-
if (reload && this.isLoaded) {
|
|
309
|
+
if (reload && this.isLoaded && !this.eventsPaused) {
|
|
310
310
|
return this.reload();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -321,7 +321,7 @@ class AjaxRepository extends Repository {
|
|
|
321
321
|
this.setBaseParam(this.paramSort, sorter.name);
|
|
322
322
|
this.setBaseParam(this.paramDirection, sorter.direction);
|
|
323
323
|
|
|
324
|
-
if (this.isLoaded) {
|
|
324
|
+
if (this.isLoaded && !this.eventsPaused) {
|
|
325
325
|
return this.reload();
|
|
326
326
|
}
|
|
327
327
|
}
|
|
@@ -335,7 +335,7 @@ class AjaxRepository extends Repository {
|
|
|
335
335
|
this.setParam(name, value);
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
if (this.isLoaded) {
|
|
338
|
+
if (this.isLoaded && !this.eventsPaused) {
|
|
339
339
|
return this.reload();
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -348,7 +348,7 @@ class AjaxRepository extends Repository {
|
|
|
348
348
|
this.setBaseParam(this.paramPageNum, this.page);
|
|
349
349
|
this.setBaseParam(this.paramPageSize, this.pageSize);
|
|
350
350
|
|
|
351
|
-
if (this.isLoaded) {
|
|
351
|
+
if (this.isLoaded && !this.eventsPaused) {
|
|
352
352
|
return this.reload();
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -927,10 +927,12 @@ class AjaxRepository extends Repository {
|
|
|
927
927
|
this.emit('save', batchOperationResults);
|
|
928
928
|
|
|
929
929
|
// Do we need to reload?
|
|
930
|
-
if (this.
|
|
931
|
-
this.
|
|
932
|
-
|
|
933
|
-
|
|
930
|
+
if (!this.eventsPaused) {
|
|
931
|
+
if (this._operations.add || this._operations.delete) {
|
|
932
|
+
this.reload();
|
|
933
|
+
} else {
|
|
934
|
+
this.emit('changeData', this.entities);
|
|
935
|
+
}
|
|
934
936
|
}
|
|
935
937
|
}));
|
|
936
938
|
}
|
|
@@ -171,7 +171,7 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
if (this.isLoaded && this.isAutoLoad) {
|
|
174
|
+
if (this.isLoaded && this.isAutoLoad && !this.eventsPaused) {
|
|
175
175
|
return this.reload();
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -191,12 +191,14 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
191
191
|
this.setBaseParam('order', sorterStrings.join(','));
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
if (this.
|
|
195
|
-
|
|
194
|
+
if (!this.eventsPaused) {
|
|
195
|
+
if (this.isLoaded && this.isAutoLoad) {
|
|
196
|
+
return this.reload().then(() => {
|
|
197
|
+
this.emit('changeSorters');
|
|
198
|
+
});
|
|
199
|
+
} else {
|
|
196
200
|
this.emit('changeSorters');
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
this.emit('changeSorters');
|
|
201
|
+
}
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
|