@megha-ui/react 1.2.35 → 1.2.37
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.
|
|
133
|
+
if (values.every((item) => typeof item === "string" && (0, regexUtils_1.isValidDateFormat)(item))) {
|
|
134
134
|
type = "date";
|
|
135
135
|
}
|
|
136
|
-
else if (values.
|
|
136
|
+
else if (values.every((item) => typeof item === "number")) {
|
|
137
137
|
type = "number";
|
|
138
138
|
}
|
|
139
|
-
else if (values.
|
|
139
|
+
else if (values.every((item) => typeof item === "string" && /^\d+$/.test(item.toString().trim()))) {
|
|
140
140
|
type = "number";
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -995,6 +995,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
995
995
|
var _a;
|
|
996
996
|
const query = searchQueries[column.key];
|
|
997
997
|
const uniqeValues = (0, gridHeader_1.getColumnData)(column.key, filteredData);
|
|
998
|
+
console.log(uniqeValues, uniqueSearch[column.key]);
|
|
998
999
|
if (query &&
|
|
999
1000
|
(query.text !== "" || query.type !== defaultSearchOperation)) {
|
|
1000
1001
|
acc[column.key] = query.text;
|
package/package.json
CHANGED