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.umd.js
CHANGED
@@ -10414,16 +10414,31 @@
|
|
10414
10414
|
setSelected = _useState6[1];
|
10415
10415
|
|
10416
10416
|
React.useEffect(function () {
|
10417
|
-
|
10418
|
-
|
10417
|
+
try {
|
10418
|
+
console.log("CONTEXT LOAD for Filters START", filters);
|
10419
|
+
return Promise.resolve(load()).then(function () {
|
10420
|
+
console.log("CONTEXT LOAD for Filters END", filters);
|
10421
|
+
});
|
10422
|
+
} catch (e) {
|
10423
|
+
return Promise.reject(e);
|
10424
|
+
}
|
10419
10425
|
}, [filters]);
|
10420
10426
|
React.useEffect(function () {
|
10421
10427
|
if (Object.keys(customFilters).length > 0) {
|
10422
|
-
console.log("CONTEXT
|
10423
|
-
|
10428
|
+
console.log("CONTEXT CustomFilters", customFilters);
|
10429
|
+
filter();
|
10424
10430
|
}
|
10425
10431
|
}, [customFilters]);
|
10426
10432
|
|
10433
|
+
function filter() {
|
10434
|
+
console.log("RUN CUSTOM FILTERS", customFilters);
|
10435
|
+
var cfs = Object.values(customFilters);
|
10436
|
+
var data = cfs.length ? cfs.reduce(function (acc, filter) {
|
10437
|
+
return filter(acc);
|
10438
|
+
}, all) : all;
|
10439
|
+
return data;
|
10440
|
+
}
|
10441
|
+
|
10427
10442
|
function clearSelection() {
|
10428
10443
|
setSelected(null);
|
10429
10444
|
}
|