@megha-ui/react 1.3.79 → 1.3.80
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.
|
@@ -633,9 +633,13 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
633
633
|
left: 0,
|
|
634
634
|
background: "var(--card-bg)",
|
|
635
635
|
width: "max-content",
|
|
636
|
+
maxWidth: "24rem",
|
|
636
637
|
maxHeight: activeSearchMaxHeight !== null && activeSearchMaxHeight !== void 0 ? activeSearchMaxHeight : 300,
|
|
637
638
|
overflow: "auto",
|
|
638
639
|
padding: "0.5rem 0.75rem",
|
|
640
|
+
borderRadius: "0.5rem",
|
|
641
|
+
boxShadow: "0 0.5rem 1rem rgba(0,0,0,0.15)",
|
|
642
|
+
border: "1px solid var(--divider, #f5f5f5)",
|
|
639
643
|
}, children: getColumnData(((_65 = headerColumns.find((column) => column.key === _groupBy)) === null || _65 === void 0 ? void 0 : _65.key) || "", gridData, (_67 = (_66 = headerColumns.find((column) => column.key === _groupBy)) === null || _66 === void 0 ? void 0 : _66.dataType) !== null && _67 !== void 0 ? _67 : "string", combinedColumns !== null && combinedColumns !== void 0 ? combinedColumns : []).length > 0 && (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
|
|
640
644
|
cursor: "pointer",
|
|
641
645
|
display: "flex",
|
|
@@ -673,6 +677,17 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
673
677
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
674
678
|
if (!column.hidden) {
|
|
675
679
|
const columnData = getColumnData(column.key, gridData, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string", combinedColumns !== null && combinedColumns !== void 0 ? combinedColumns : []);
|
|
680
|
+
const colSearchOptions = searchOptions.filter((item) => (column === null || column === void 0 ? void 0 : column.dataType) === "number" || (column === null || column === void 0 ? void 0 : column.dataType) === "currency"
|
|
681
|
+
? numberTypeSearch.includes(item.value)
|
|
682
|
+
: (column === null || column === void 0 ? void 0 : column.dataType) === "date"
|
|
683
|
+
? dateTypeSearch.includes(item.value)
|
|
684
|
+
: textTypeSearch.includes(item.value));
|
|
685
|
+
console.log(colSearchOptions.find((item) => {
|
|
686
|
+
var _a, _b;
|
|
687
|
+
return item.value === ((_b = searchQueries[(_a = column === null || column === void 0 ? void 0 : column.key) !== null && _a !== void 0 ? _a : ""]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
688
|
+
defaultSearchOperation ||
|
|
689
|
+
"contains";
|
|
690
|
+
}));
|
|
676
691
|
return (_jsx("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", wordBreak: widthMode === "auto" ? "break-all" : "unset", backgroundColor: "var(--row-header-bg)", borderTop: headerTopBorder, borderBottom: headerBottomBorder, flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, position: "sticky", top: 0, zIndex: 1 }), onMouseMove: (e) => handleMouseMove(e), onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: !actionsKey.split(",").includes(column.key) && (_jsxs(_Fragment, { children: [resizable && (_jsx("div", { style: {
|
|
677
692
|
position: "absolute",
|
|
678
693
|
width: "1px",
|
|
@@ -929,14 +944,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
929
944
|
var _a;
|
|
930
945
|
const value = ((_a = selected[0]) === null || _a === void 0 ? void 0 : _a.toString()) || "";
|
|
931
946
|
handleSearchOptionSelect(column.key, value);
|
|
932
|
-
}, selectedDisplay: (_x = (_w =
|
|
933
|
-
.filter((item) => (column === null || column === void 0 ? void 0 : column.dataType) === "number" ||
|
|
934
|
-
(column === null || column === void 0 ? void 0 : column.dataType) === "currency"
|
|
935
|
-
? numberTypeSearch.includes(item.value)
|
|
936
|
-
: (column === null || column === void 0 ? void 0 : column.dataType) === "date"
|
|
937
|
-
? dateTypeSearch.includes(item.value)
|
|
938
|
-
: textTypeSearch.includes(item.value))
|
|
939
|
-
.find((item) => {
|
|
947
|
+
}, selectedDisplay: (_x = (_w = colSearchOptions.find((item) => {
|
|
940
948
|
var _a, _b;
|
|
941
949
|
return item.value ===
|
|
942
950
|
((_b = searchQueries[(_a = column === null || column === void 0 ? void 0 : column.key) !== null && _a !== void 0 ? _a : ""]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
@@ -949,9 +957,13 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
949
957
|
left: 0,
|
|
950
958
|
background: "var(--card-bg)",
|
|
951
959
|
width: "max-content",
|
|
960
|
+
maxWidth: "24rem",
|
|
952
961
|
maxHeight: activeSearchMaxHeight !== null && activeSearchMaxHeight !== void 0 ? activeSearchMaxHeight : 300,
|
|
953
962
|
overflow: "auto",
|
|
954
963
|
padding: "0.5rem 0.75rem",
|
|
964
|
+
borderRadius: "0.5rem",
|
|
965
|
+
boxShadow: "0 0.5rem 1rem rgba(0,0,0,0.15)",
|
|
966
|
+
border: "1px solid var(--divider, #f5f5f5)",
|
|
955
967
|
}, children: [_jsxs("div", { style: {
|
|
956
968
|
cursor: "pointer",
|
|
957
969
|
display: "flex",
|
package/package.json
CHANGED