@megha-ui/react 1.2.318 → 1.2.320
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.
|
@@ -661,7 +661,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
661
661
|
groupedData.forEach((group) => {
|
|
662
662
|
const _groupedValues = [...groupedValues, group.value].map((item) => item ? item : "row");
|
|
663
663
|
const currentKeys = (group.allKeys
|
|
664
|
-
? [...parentKeys,
|
|
664
|
+
? [...parentKeys, group.allKeys.join("+")]
|
|
665
665
|
: [...parentKeys, group.key]).filter((item) => item);
|
|
666
666
|
const groupedValue = _groupedValues.join(">");
|
|
667
667
|
const groupedColumns = currentKeys.join(">");
|
|
@@ -55,9 +55,7 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
55
55
|
boxSizing: "border-box", // Include padding and borders in the element's total width and height
|
|
56
56
|
backgroundColor: "var(--summary-bg)",
|
|
57
57
|
}, onClick: () => updateRowOpened(item.groupedValue), children: [(_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").map((columnKey, index) => {
|
|
58
|
-
var _a;
|
|
59
58
|
const column = gridColumns.find((column) => column.key === columnKey);
|
|
60
|
-
const showCount = ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").length) - 1 === index;
|
|
61
59
|
if (column) {
|
|
62
60
|
return (_jsxs("div", { style: {
|
|
63
61
|
width: widthMode === "auto"
|
|
@@ -87,13 +85,15 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
87
85
|
justifyContent: "center",
|
|
88
86
|
}, children: rowOpened.includes(item.groupedValue || "")
|
|
89
87
|
? "-"
|
|
90
|
-
: "+" }),
|
|
88
|
+
: "+" }), _jsx("div", { children: (() => {
|
|
91
89
|
const keys = (item.groupedKey || "").split(">");
|
|
92
90
|
const vals = (item.groupedValue || "").split(">");
|
|
93
91
|
const idx = keys.indexOf(columnKey);
|
|
94
92
|
const display = idx > -1 ? vals[idx] : "";
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if (display) {
|
|
94
|
+
return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
|
|
95
|
+
}
|
|
96
|
+
})() })] }));
|
|
97
97
|
}
|
|
98
98
|
return null;
|
|
99
99
|
}), isSummarise &&
|
package/package.json
CHANGED