ywana-core8 0.0.768 → 0.0.769
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/dist/index.cjs +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +19 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +19 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/CollectionContext.js +15 -2
package/dist/index.cjs
CHANGED
@@ -10361,6 +10361,8 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
10361
10361
|
|
10362
10362
|
var load = function load() {
|
10363
10363
|
try {
|
10364
|
+
var _exit2;
|
10365
|
+
|
10364
10366
|
var runCustomFilters = function runCustomFilters(all) {
|
10365
10367
|
var cfs = Object.values(customFilters);
|
10366
10368
|
var data = cfs.length ? cfs.reduce(function (acc, filter) {
|
@@ -10369,17 +10371,16 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
10369
10371
|
return data;
|
10370
10372
|
};
|
10371
10373
|
|
10372
|
-
|
10374
|
+
return Promise.resolve(_catch$1(function () {
|
10373
10375
|
return Promise.resolve(API.all(filters, likes, page)).then(function (response) {
|
10374
10376
|
var next = field ? response[field] : response;
|
10375
10377
|
var data = runCustomFilters(next);
|
10376
|
-
|
10378
|
+
_exit2 = 1;
|
10379
|
+
return data;
|
10377
10380
|
});
|
10378
10381
|
}, function (error) {
|
10379
10382
|
console.log(error);
|
10380
|
-
});
|
10381
|
-
|
10382
|
-
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
10383
|
+
}));
|
10383
10384
|
} catch (e) {
|
10384
10385
|
return Promise.reject(e);
|
10385
10386
|
}
|
@@ -10421,7 +10422,19 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
10421
10422
|
|
10422
10423
|
React.useEffect(function () {
|
10423
10424
|
console.log("CONTEXT LOAD for Filters", filters, customFilters);
|
10424
|
-
|
10425
|
+
var mounted = true;
|
10426
|
+
|
10427
|
+
var callLoad = function callLoad() {
|
10428
|
+
return Promise.resolve(load()).then(function (data) {
|
10429
|
+
if (mounted) setAll(data);
|
10430
|
+
});
|
10431
|
+
};
|
10432
|
+
|
10433
|
+
callLoad();
|
10434
|
+
return function () {
|
10435
|
+
console.log("CONTEXT UNMOUNT", filters, customFilters);
|
10436
|
+
mounted = false;
|
10437
|
+
};
|
10425
10438
|
}, [filters, customFilters]);
|
10426
10439
|
|
10427
10440
|
function clearSelection() {
|