@megha-ui/react 1.2.698 → 1.2.700

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;
@@ -426,6 +433,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
426
433
  });
427
434
  let value = "";
428
435
  const column = gridColumns.find((item) => item.key === columnKey);
436
+ console.log({ filteredValues });
429
437
  const nonEmptyValues = filteredValues
430
438
  .filter((item) => item.toString() !== "")
431
439
  .sort((a, b) => {
@@ -1445,21 +1453,24 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
1445
1453
  }, children: [_jsx("div", { title: "Clear All Groups", onClick: () => {
1446
1454
  // setChanged((prev) => [...prev, "groupBy"]);
1447
1455
  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: {
1456
+ }, style: { cursor: "pointer", marginRight: "0.5rem" }, children: _jsx(MdGroupOff, { size: 18 }) }), gridGroupBy.split(",").map((chip) => {
1457
+ const column = columns.find(item => item.key === chip);
1458
+ return (_jsxs("div", { style: {
1459
+ display: "inline-flex",
1460
+ alignItems: "center",
1461
+ padding: "0.25rem",
1462
+ borderRadius: "0.25rem",
1463
+ margin: "0 0.25rem",
1464
+ backgroundColor: chipColor,
1465
+ }, children: [_jsx("span", { children: column === null || column === void 0 ? void 0 : column.label }), _jsx("span", { style: {
1466
+ display: "inline-block",
1467
+ cursor: "pointer",
1468
+ marginLeft: "0.5rem",
1469
+ }, onClick: () => setGridGroupBy((prev) => prev
1470
+ .split(",")
1471
+ .filter((item) => item !== chip)
1472
+ .join(",")), children: "\u00D7" })] }, chip));
1473
+ })] }))] }), _jsxs("div", { id: `grid-content`, style: {
1463
1474
  display: "block",
1464
1475
  border: gridBorder ? "1px solid #f0f0f0" : "none",
1465
1476
  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.700",
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",