@megha-ui/react 1.2.776 → 1.2.778

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.
@@ -159,17 +159,19 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
159
159
  ? Object.keys(fixedFilterValues)
160
160
  .filter((key) => fixedColumns.find((col) => col.key === key))
161
161
  .every((key) => {
162
- var _a, _b;
162
+ var _a, _b, _c, _d;
163
163
  const filterValue = fixedFilterValues[key];
164
164
  if (filterValue.length === 0)
165
165
  return true;
166
166
  const cellValue = ((_b = (_a = item[key]) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toString()) || "";
167
- const col = columns.find((item) => key === item.key);
168
- console.log({
169
- col,
170
- isArrayString: col === null || col === void 0 ? void 0 : col.isArrayString,
171
- valueArray: item[key].isArrayString
172
- });
167
+ const arrayValue = (_d = (_c = item === null || item === void 0 ? void 0 : item[key]) === null || _c === void 0 ? void 0 : _c.isArrayString) !== null && _d !== void 0 ? _d : false;
168
+ if (arrayValue) {
169
+ return filterValue.some((item) => cellValue.split(">>").includes(item));
170
+ }
171
+ else if (cellValue.includes(">>")) {
172
+ const value = cellValue.split(">>").map((item) => item.trim());
173
+ return filterValue.includes(value[value.length - 1]);
174
+ }
173
175
  return filterValue.includes(cellValue);
174
176
  })
175
177
  : true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.776",
3
+ "version": "1.2.778",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",