@megha-ui/react 1.2.330 → 1.2.332

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.
@@ -85,6 +85,7 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
85
85
  }, children: rowOpened.includes(item.groupedValue || "")
86
86
  ? "-"
87
87
  : "+" })), _jsx("div", { children: (() => {
88
+ var _a;
88
89
  const keys = (item.groupedKey || "").split(">");
89
90
  const vals = (item.groupedValue || "").split(">");
90
91
  const idx = keys.indexOf(columnKey);
@@ -102,15 +103,18 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
102
103
  : compositeIndex > -1
103
104
  ? compositeValues[compositeIndex]
104
105
  : "";
105
- if (display &&
106
- (idx === keys.length - 1)) {
106
+ console.log({ compositeIndex, idx, columnKey });
107
+ if (display && idx === keys.length - 1) {
107
108
  return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
108
109
  }
109
- else if (display && compositeIndex === compositeKeys.length - 1) {
110
+ else if (display &&
111
+ compositeIndex === compositeKeys.length - 1 &&
112
+ index ===
113
+ ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").flatMap((item) => item.split("+")).length) - 1) {
110
114
  return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
111
115
  }
112
- console.log({ item, columnKey, index });
113
- if (compositeKeys.includes(item.key) || item.key === columnKey) {
116
+ if (compositeKeys.includes(item.key) ||
117
+ item.key === columnKey) {
114
118
  return display;
115
119
  }
116
120
  })() })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.330",
3
+ "version": "1.2.332",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",