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