@megha-ui/react 1.2.331 → 1.2.333
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.
|
@@ -68,6 +68,8 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
68
68
|
flex: widthMode === "auto" ? 1 : undefined,
|
|
69
69
|
flexGrow: widthMode === "auto" ? 1 : 0,
|
|
70
70
|
flexShrink: widthMode === "auto" ? 1 : 0,
|
|
71
|
+
display: "flex",
|
|
72
|
+
alignItems: "center",
|
|
71
73
|
padding: "0.5rem",
|
|
72
74
|
}, className: `column index-${columnKey}`, children: [index === 0 && (_jsx("span", { style: {
|
|
73
75
|
fontSize: "inherit",
|
|
@@ -85,6 +87,7 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
85
87
|
}, children: rowOpened.includes(item.groupedValue || "")
|
|
86
88
|
? "-"
|
|
87
89
|
: "+" })), _jsx("div", { children: (() => {
|
|
90
|
+
var _a;
|
|
88
91
|
const keys = (item.groupedKey || "").split(">");
|
|
89
92
|
const vals = (item.groupedValue || "").split(">");
|
|
90
93
|
const idx = keys.indexOf(columnKey);
|
|
@@ -103,14 +106,18 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
103
106
|
? compositeValues[compositeIndex]
|
|
104
107
|
: "";
|
|
105
108
|
console.log({ compositeIndex, idx, columnKey });
|
|
106
|
-
if (display &&
|
|
107
|
-
(idx === keys.length - 1)) {
|
|
109
|
+
if (display && idx === keys.length - 1) {
|
|
108
110
|
return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
|
|
109
111
|
}
|
|
110
|
-
else if (display &&
|
|
112
|
+
else if (display &&
|
|
113
|
+
compositeIndex === compositeKeys.length - 1 &&
|
|
114
|
+
index ===
|
|
115
|
+
((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").flatMap((item) => item.split("+")).length) -
|
|
116
|
+
1) {
|
|
111
117
|
return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
|
|
112
118
|
}
|
|
113
|
-
if (compositeKeys.includes(item.key) ||
|
|
119
|
+
if (compositeKeys.includes(item.key) ||
|
|
120
|
+
item.key === columnKey) {
|
|
114
121
|
return display;
|
|
115
122
|
}
|
|
116
123
|
})() })] }));
|
package/package.json
CHANGED