@megha-ui/react 1.2.32 → 1.2.34

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.
@@ -992,16 +992,15 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
992
992
  };
993
993
  const filterDetails = (0, react_1.useMemo)(() => {
994
994
  const filterColumn = gridColumns.reduce((acc, column) => {
995
- var _a, _b, _c;
995
+ var _a;
996
996
  const query = searchQueries[column.key];
997
997
  const uniqeValues = (0, gridHeader_1.getColumnData)(column.key, filteredData);
998
- console.log({ unqv: uniqeValues.join(""), unq: (_a = uniqueSearch[column.key]) === null || _a === void 0 ? void 0 : _a.join(""), bool: uniqueSearch[column.key] && uniqeValues.join("") !== ((_b = uniqueSearch[column.key]) === null || _b === void 0 ? void 0 : _b.join("")), key: column.key });
999
998
  if (query &&
1000
999
  (query.text !== "" || query.type !== defaultSearchOperation)) {
1001
1000
  acc[column.key] = query.text;
1002
1001
  }
1003
1002
  else if (uniqueSearch[column.key] &&
1004
- uniqeValues.join("") !== ((_c = uniqueSearch[column.key]) === null || _c === void 0 ? void 0 : _c.join(""))) {
1003
+ uniqeValues.join("") !== ((_a = uniqueSearch[column.key]) === null || _a === void 0 ? void 0 : _a.join(""))) {
1005
1004
  acc[column.key] = uniqueSearch[column.key].join(",");
1006
1005
  }
1007
1006
  return acc;
@@ -1024,7 +1023,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
1024
1023
  }
1025
1024
  return acc;
1026
1025
  }, {});
1027
- console.log(propFilterColumn, filterColumn);
1028
1026
  const sortColumn = gridColumns.reduce((acc, column) => {
1029
1027
  const query = sortQueries === null || sortQueries === void 0 ? void 0 : sortQueries[column.key];
1030
1028
  if (query) {
@@ -51,7 +51,7 @@ const getColumnData = (columnKey, gridData) => {
51
51
  ...new Set(gridData
52
52
  .filter((item) => item[columnKey])
53
53
  .map((data) => data[columnKey] && data[columnKey].value
54
- ? /^\d+$/.test(data[columnKey].value.toString().trim())
54
+ ? /^[-+]?\d*\.?\d+$/.test(data[columnKey].value.toString().trim())
55
55
  ? parseInt(data[columnKey].value.toString())
56
56
  : data[columnKey].value.toString()
57
57
  : "")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
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.mjs",