@megha-ui/react 1.2.536 → 1.2.538
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.
|
@@ -228,7 +228,9 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
228
228
|
return true;
|
|
229
229
|
}
|
|
230
230
|
})
|
|
231
|
-
: filterColumns
|
|
231
|
+
: filterColumns
|
|
232
|
+
.filter((column) => { var _a; return (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text; })
|
|
233
|
+
.some((column) => {
|
|
232
234
|
var _a, _b, _c;
|
|
233
235
|
const query = (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text;
|
|
234
236
|
const queryData = query.toLowerCase().split(",");
|
|
@@ -268,12 +270,12 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
268
270
|
return true;
|
|
269
271
|
case "after":
|
|
270
272
|
if (!isNaN(new Date(query).getTime())) {
|
|
271
|
-
return new Date(value).getTime() > new Date(query).getTime();
|
|
273
|
+
return (new Date(value).getTime() > new Date(query).getTime());
|
|
272
274
|
}
|
|
273
275
|
return true;
|
|
274
276
|
case "before":
|
|
275
277
|
if (!isNaN(new Date(query).getTime())) {
|
|
276
|
-
return new Date(value).getTime() < new Date(query).getTime();
|
|
278
|
+
return (new Date(value).getTime() < new Date(query).getTime());
|
|
277
279
|
}
|
|
278
280
|
return true;
|
|
279
281
|
case "between":
|
|
@@ -1293,7 +1295,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1293
1295
|
alignItems: "center",
|
|
1294
1296
|
justifyContent: "center",
|
|
1295
1297
|
padding: "1rem",
|
|
1296
|
-
}, children: "Show/Hide columns" }), _jsx("div", {
|
|
1298
|
+
}, children: "Show/Hide columns" }), _jsx("div", { style: { flexGrow: 1, overflow: "auto", padding: "1rem" }, children: filterColumns.map((column) => {
|
|
1297
1299
|
if (!column.fixed) {
|
|
1298
1300
|
return (_jsxs("div", { style: {
|
|
1299
1301
|
display: "flex",
|
|
@@ -1437,7 +1439,10 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1437
1439
|
? (_a = data[column.key].value) === null || _a === void 0 ? void 0 : _a.toString()
|
|
1438
1440
|
: "";
|
|
1439
1441
|
}),
|
|
1440
|
-
].sort((a, b) => {
|
|
1442
|
+
].sort((a, b) => {
|
|
1443
|
+
var _a, _b;
|
|
1444
|
+
return comparator(a, b, (_a = column.dataType) !== null && _a !== void 0 ? _a : "", (_b = column.fixedFilterOrder) !== null && _b !== void 0 ? _b : "asc");
|
|
1445
|
+
});
|
|
1441
1446
|
selectedValues.forEach((item) => {
|
|
1442
1447
|
if (!options.includes(item)) {
|
|
1443
1448
|
options.push(item);
|
|
@@ -1476,7 +1481,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1476
1481
|
: undefined, isSort: column.fixedFilterOrder ? false : undefined, isClear: true, searchEnabled: true, dropdownListWidth: "max-content", className: "h-8 mt-2", isMultiple: column.fixedFilter === "multi-select" }) }, column.key));
|
|
1477
1482
|
}
|
|
1478
1483
|
return null;
|
|
1479
|
-
}) }), _jsxs("div", { style: {
|
|
1484
|
+
}) }), _jsxs("div", { id: `grid-content`, style: {
|
|
1480
1485
|
display: "block",
|
|
1481
1486
|
border: gridBorder ? "1px solid #f0f0f0" : "none",
|
|
1482
1487
|
overflow: calculateVisible && gridGroupBy ? "visible" : "auto",
|
package/package.json
CHANGED