@megha-ui/react 1.2.627 → 1.2.629

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);
@@ -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,9 +746,8 @@ 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
- }, [sortedData, gridGroupBy, gridColumns]);
750
+ }, [searchQueries, sortQueries, gridGroupBy, gridColumns]);
778
751
  const handleSearch = (key, value, type) => {
779
752
  setSearchQueries((prev) => (Object.assign(Object.assign({}, prev), { [key]: { text: value, type, operation: "and" } })));
780
753
  setUniqueSearch((prev) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.627",
3
+ "version": "1.2.629",
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",