@megha-ui/react 1.2.698 → 1.2.699

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.
@@ -399,7 +399,10 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
399
399
  const { groupedKey, groupedValue } = grouped;
400
400
  const filterValue = _groupedKeys.length > 1 ? groupedValue : "";
401
401
  const filterSegments = filterValue
402
- ? filterValue.split(">").map((v) => v.trim()).filter((v) => v)
402
+ ? filterValue
403
+ .split(">")
404
+ .map((v) => v.trim())
405
+ .filter((v) => v)
403
406
  : [];
404
407
  const matchesGroup = (item, group) => {
405
408
  var _a, _b;
@@ -417,8 +420,12 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
417
420
  const filteredValues = filteredData
418
421
  .filter((item) => filterValue
419
422
  ? filterSegments.length > 1
420
- ? groupedKey.split(">").every((group) => matchesGroup(item, group))
421
- : groupedKey.split(">").some((group) => matchesGroup(item, group))
423
+ ? groupedKey
424
+ .split(">")
425
+ .every((group) => matchesGroup(item, group))
426
+ : groupedKey
427
+ .split(">")
428
+ .some((group) => matchesGroup(item, group))
422
429
  : true)
423
430
  .map((item) => {
424
431
  var _a;
@@ -1445,21 +1452,24 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
1445
1452
  }, children: [_jsx("div", { title: "Clear All Groups", onClick: () => {
1446
1453
  // setChanged((prev) => [...prev, "groupBy"]);
1447
1454
  setGridGroupBy("");
1448
- }, style: { cursor: "pointer", marginRight: "0.5rem" }, children: _jsx(MdGroupOff, { size: 18 }) }), gridGroupBy.split(",").map((chip) => (_jsxs("div", { style: {
1449
- display: "inline-flex",
1450
- alignItems: "center",
1451
- padding: "0.25rem",
1452
- borderRadius: "0.25rem",
1453
- margin: "0 0.25rem",
1454
- backgroundColor: chipColor,
1455
- }, children: [_jsx("span", { children: chip }), _jsx("span", { style: {
1456
- display: "inline-block",
1457
- cursor: "pointer",
1458
- marginLeft: "0.5rem",
1459
- }, onClick: () => setGridGroupBy((prev) => prev
1460
- .split(",")
1461
- .filter((item) => item !== chip)
1462
- .join(",")), children: "\u00D7" })] }, chip)))] }))] }), _jsxs("div", { id: `grid-content`, style: {
1455
+ }, style: { cursor: "pointer", marginRight: "0.5rem" }, children: _jsx(MdGroupOff, { size: 18 }) }), gridGroupBy.split(",").map((chip) => {
1456
+ const column = columns.find(item => item.key === chip);
1457
+ return (_jsxs("div", { style: {
1458
+ display: "inline-flex",
1459
+ alignItems: "center",
1460
+ padding: "0.25rem",
1461
+ borderRadius: "0.25rem",
1462
+ margin: "0 0.25rem",
1463
+ backgroundColor: chipColor,
1464
+ }, children: [_jsx("span", { children: column === null || column === void 0 ? void 0 : column.label }), _jsx("span", { style: {
1465
+ display: "inline-block",
1466
+ cursor: "pointer",
1467
+ marginLeft: "0.5rem",
1468
+ }, onClick: () => setGridGroupBy((prev) => prev
1469
+ .split(",")
1470
+ .filter((item) => item !== chip)
1471
+ .join(",")), children: "\u00D7" })] }, chip));
1472
+ })] }))] }), _jsxs("div", { id: `grid-content`, style: {
1463
1473
  display: "block",
1464
1474
  border: gridBorder ? "1px solid #f0f0f0" : "none",
1465
1475
  overflow: calculateVisible && gridGroupBy ? "visible" : "auto",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.698",
3
+ "version": "1.2.699",
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",