@doyourjob/gravity-ui-page-constructor 5.31.64 → 5.31.65

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.
@@ -21,13 +21,7 @@ const ReportsBlock = ({ title, typeKey, empty }) => {
21
21
  const filteredItems = (0, react_1.useMemo)(() => {
22
22
  const f = Object.entries(localFilters).filter(([_, value]) => value !== 'all');
23
23
  return f.length
24
- ? items.filter((item) => f.reduce((acc, [key, value]) => {
25
- var _a, _b;
26
- if ((_b = (_a = item.filters) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.includes(value)) {
27
- return true;
28
- }
29
- return acc;
30
- }, false))
24
+ ? items.filter((item) => f.every(([key, value]) => { var _a, _b; return (_b = (_a = item.filters) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.includes(value); }))
31
25
  : items;
32
26
  }, [items, localFilters]);
33
27
  const paginatedItems = (0, react_1.useMemo)(() => {
@@ -18,13 +18,7 @@ export const ReportsBlock = ({ title, typeKey, empty }) => {
18
18
  const filteredItems = useMemo(() => {
19
19
  const f = Object.entries(localFilters).filter(([_, value]) => value !== 'all');
20
20
  return f.length
21
- ? items.filter((item) => f.reduce((acc, [key, value]) => {
22
- var _a, _b;
23
- if ((_b = (_a = item.filters) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.includes(value)) {
24
- return true;
25
- }
26
- return acc;
27
- }, false))
21
+ ? items.filter((item) => f.every(([key, value]) => { var _a, _b; return (_b = (_a = item.filters) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.includes(value); }))
28
22
  : items;
29
23
  }, [items, localFilters]);
30
24
  const paginatedItems = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doyourjob/gravity-ui-page-constructor",
3
- "version": "5.31.64",
3
+ "version": "5.31.65",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {