@megha-ui/react 1.2.305 → 1.2.306

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.
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { memo, useEffect, useRef, useState } from "react";
3
3
  import GroupedRow from "./groupedRow";
4
4
  import SummariseDetails from "./SummariseDetails";
@@ -72,10 +72,8 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
72
72
  }, children: rowOpened.includes(item.groupedValue || "") ? "-" : "+" }), (_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").map((columnKey, index) => {
73
73
  var _a;
74
74
  const column = gridColumns.find((column) => column.key === columnKey);
75
- console.log(index, column, columnKey);
76
- const showCount = ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").filter((key) => key !== item.key).length) -
77
- 1 ===
78
- index;
75
+ console.log(index, item);
76
+ const showCount = ((_a = item.groupedKey) === null || _a === void 0 ? void 0 : _a.split(">").length) - 1 === index;
79
77
  if (column) {
80
78
  return (_jsx("div", { style: {
81
79
  width: widthMode === "auto"
@@ -89,13 +87,13 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
89
87
  flexGrow: widthMode === "auto" ? 1 : 0,
90
88
  flexShrink: widthMode === "auto" ? 1 : 0,
91
89
  padding: "0.5rem",
92
- }, className: `column index-${columnKey}`, children: showCount && (_jsxs(_Fragment, { children: [(() => {
93
- const keys = (item.groupedKey || "").split(">");
94
- const vals = (item.groupedValue || "").split(">");
95
- const idx = keys.indexOf(columnKey);
96
- const display = idx > -1 ? vals[idx] : "";
97
- return _jsx("div", { children: display });
98
- })(), _jsx("span", { children: `(${item === null || item === void 0 ? void 0 : item.count})` })] })) }));
90
+ }, className: `column index-${columnKey}`, children: showCount && (_jsx("div", { children: (() => {
91
+ const keys = (item.groupedKey || "").split(">");
92
+ const vals = (item.groupedValue || "").split(">");
93
+ const idx = keys.indexOf(columnKey);
94
+ const display = idx > -1 ? vals[idx] : "";
95
+ return `${display} (${item === null || item === void 0 ? void 0 : item.count})`;
96
+ })() })) }));
99
97
  }
100
98
  return null;
101
99
  }), isSummarise &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.305",
3
+ "version": "1.2.306",
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",