@onehat/data 1.4.6 → 1.4.7
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
|
@@ -292,8 +292,8 @@ class AjaxRepository extends Repository {
|
|
|
292
292
|
*/
|
|
293
293
|
_onChangeSorters = () => {
|
|
294
294
|
const sorter = this.sorters[0];
|
|
295
|
-
this.setParam(this.paramSort, sorter.name);
|
|
296
|
-
this.setParam(this.paramDirection, sorter.direction);
|
|
295
|
+
this.setParam(this.paramSort, sorter.name, true); // true to set baseParam
|
|
296
|
+
this.setParam(this.paramDirection, sorter.direction, true);
|
|
297
297
|
|
|
298
298
|
if (this.isLoaded) {
|
|
299
299
|
return this.reload();
|
|
@@ -319,8 +319,8 @@ class AjaxRepository extends Repository {
|
|
|
319
319
|
* Refreshes entities.
|
|
320
320
|
*/
|
|
321
321
|
_onChangePagination = () => {
|
|
322
|
-
this.setParam(this.paramPageNum, this.page);
|
|
323
|
-
this.setParam(this.paramPageSize, this.pageSize);
|
|
322
|
+
this.setParam(this.paramPageNum, this.page, true); // true to set baseParam
|
|
323
|
+
this.setParam(this.paramPageSize, this.pageSize, true);
|
|
324
324
|
|
|
325
325
|
if (this.isLoaded) {
|
|
326
326
|
return this.reload();
|
|
@@ -1328,6 +1328,9 @@ export default class Repository extends EventEmitter {
|
|
|
1328
1328
|
if (!_.isArray(entities)) {
|
|
1329
1329
|
entities = [entities];
|
|
1330
1330
|
}
|
|
1331
|
+
if (!entities.length) {
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1331
1334
|
_.each(entities, (entity) => {
|
|
1332
1335
|
entity.markDeleted(); // Entity is still there, it's just marked for deletion
|
|
1333
1336
|
});
|