@megha-ui/react 1.2.626 → 1.2.628

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.
@@ -71,7 +71,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
71
71
  new: "Earliest",
72
72
  old: "Latest",
73
73
  };
74
- const [prevRenderedData, setPrevRenderedData] = useState(null);
75
74
  const [globalSearchOp, setGlobalSearchOp] = useState("or");
76
75
  const [searchOp, setSearchOp] = useState("and");
77
76
  const [summariseAvailable, setSummariseAvailable] = useState(false);
@@ -614,7 +613,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
614
613
  const flatArray = [];
615
614
  if (groupedData) {
616
615
  groupedData.forEach((group) => {
617
- const _groupedValues = [...groupedValues, group.value].map((item) => item ? item : "row");
616
+ const _groupedValues = [...groupedValues, group.value].map((item) => item ? item : "--");
618
617
  const currentKeys = (group.allKeys
619
618
  ? [...parentKeys, group.allKeys.join("+")]
620
619
  : [...parentKeys, group.key]).filter((item) => item);
@@ -689,30 +688,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
689
688
  getLoadingState && getLoadingState(hugLoading);
690
689
  }, [hugLoading]);
691
690
  useEffect(() => {
692
- let shouldRender = true;
693
- const _prevRenderedData = prevRenderedData ? prevRenderedData : [];
694
- if (_prevRenderedData &&
695
- _prevRenderedData.length > 0 &&
696
- sortedData
697
- .map((item) => Object.values(item)
698
- .filter((item) => Object.keys(item).includes("shouldRender")
699
- ? item.shouldRender
700
- : true)
701
- .map((item) => item.value)
702
- .join(","))
703
- .sort()
704
- .toString() ===
705
- _prevRenderedData
706
- .map((item) => Object.values(item)
707
- .filter((item) => Object.keys(item).includes("shouldRender")
708
- ? item.shouldRender
709
- : true)
710
- .map((item) => item.value)
711
- .join(","))
712
- .sort()
713
- .toString()) {
714
- shouldRender = false;
715
- }
716
691
  const hasNoWidths = gridColumns.every((column) => {
717
692
  if (typeof column.width === "undefined") {
718
693
  return true;
@@ -720,7 +695,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
720
695
  return typeof column.width === "string" && column.width === "";
721
696
  });
722
697
  if (entrieGridRef.current &&
723
- shouldRender &&
724
698
  widthMode === "custom" &&
725
699
  hasNoWidths &&
726
700
  !ignoreHugContent) {
@@ -772,7 +746,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
772
746
  setColumnWidths(_columnWidths);
773
747
  setHugLoading(false);
774
748
  }, 1000);
775
- setPrevRenderedData(sortedData);
776
749
  }
777
750
  }, [sortedData, gridGroupBy, gridColumns]);
778
751
  const handleSearch = (key, value, type) => {
@@ -60,9 +60,9 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
60
60
  width: widthMode === "auto"
61
61
  ? "auto"
62
62
  : (column === null || column === void 0 ? void 0 : column.width)
63
- ? column === null || column === void 0 ? void 0 : column.width
63
+ ? `calc(${column === null || column === void 0 ? void 0 : column.width} + 25px)`
64
64
  : columnWidths[`column-${columnKey}`]
65
- ? columnWidths[`column-${columnKey}`]
65
+ ? `calc(${columnWidths[`column-${columnKey}`]} + 25px)`
66
66
  : "fit-content",
67
67
  flex: widthMode === "auto" ? 1 : undefined,
68
68
  flexGrow: widthMode === "auto" ? 1 : 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.626",
3
+ "version": "1.2.628",
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",