@megha-ui/react 1.2.35 → 1.2.36

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.
@@ -130,13 +130,13 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
130
130
  const values = data.map((row) => { var _a, _b; return (_b = (_a = row === null || row === void 0 ? void 0 : row[item === null || item === void 0 ? void 0 : item.key]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ""; });
131
131
  const hasValues = values.some((item) => item !== "");
132
132
  if (hasValues) {
133
- if (values.some((item) => typeof item === "string" && (0, regexUtils_1.isValidDateFormat)(item))) {
133
+ if (values.every((item) => typeof item === "string" && (0, regexUtils_1.isValidDateFormat)(item))) {
134
134
  type = "date";
135
135
  }
136
- else if (values.some((item) => typeof item === "number")) {
136
+ else if (values.every((item) => typeof item === "number")) {
137
137
  type = "number";
138
138
  }
139
- else if (values.some((item) => typeof item === "string" && /^\d+$/.test(item.toString().trim()))) {
139
+ else if (values.every((item) => typeof item === "string" && /^\d+$/.test(item.toString().trim()))) {
140
140
  type = "number";
141
141
  }
142
142
  }
@@ -1011,6 +1011,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
1011
1011
  const { searchQueries, uniqueSearch } = filterData;
1012
1012
  const query = searchQueries[column.key];
1013
1013
  const uniqeValues = (0, gridHeader_1.getColumnData)(column.key, filteredData);
1014
+ console.log(uniqeValues);
1014
1015
  if (query &&
1015
1016
  (query.text !== "" || query.type !== defaultSearchOperation)) {
1016
1017
  acc[column.key] = query.text;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
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",