ywana-core8 0.0.766 → 0.0.767
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 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +19 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +19 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/CollectionContext.js +13 -5
package/dist/index.modern.js
CHANGED
@@ -10412,16 +10412,31 @@ var CollectionContextProvider = function CollectionContextProvider(props) {
|
|
10412
10412
|
setSelected = _useState6[1];
|
10413
10413
|
|
10414
10414
|
useEffect(function () {
|
10415
|
-
|
10416
|
-
|
10415
|
+
try {
|
10416
|
+
console.log("CONTEXT LOAD for Filters START", filters);
|
10417
|
+
return Promise.resolve(load()).then(function () {
|
10418
|
+
console.log("CONTEXT LOAD for Filters END", filters);
|
10419
|
+
});
|
10420
|
+
} catch (e) {
|
10421
|
+
return Promise.reject(e);
|
10422
|
+
}
|
10417
10423
|
}, [filters]);
|
10418
10424
|
useEffect(function () {
|
10419
10425
|
if (Object.keys(customFilters).length > 0) {
|
10420
|
-
console.log("CONTEXT
|
10421
|
-
|
10426
|
+
console.log("CONTEXT CustomFilters", customFilters);
|
10427
|
+
filter();
|
10422
10428
|
}
|
10423
10429
|
}, [customFilters]);
|
10424
10430
|
|
10431
|
+
function filter() {
|
10432
|
+
console.log("RUN CUSTOM FILTERS", customFilters);
|
10433
|
+
var cfs = Object.values(customFilters);
|
10434
|
+
var data = cfs.length ? cfs.reduce(function (acc, filter) {
|
10435
|
+
return filter(acc);
|
10436
|
+
}, all) : all;
|
10437
|
+
return data;
|
10438
|
+
}
|
10439
|
+
|
10425
10440
|
function clearSelection() {
|
10426
10441
|
setSelected(null);
|
10427
10442
|
}
|