@megha-ui/react 1.2.212 → 1.2.214

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.
@@ -22,12 +22,14 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
22
22
  }
23
23
  }, []);
24
24
  useEffect(() => {
25
- if (typeof uniqueSearch[columnKey] === "undefined") {
26
- setUniqueSearch((prev) => (Object.assign(Object.assign({}, prev), { [columnKey]: columnData })));
25
+ if (columnData.length > 0) {
26
+ if (typeof uniqueSearch[columnKey] === "undefined") {
27
+ setUniqueSearch((prev) => (Object.assign(Object.assign({}, prev), { [columnKey]: columnData })));
28
+ }
29
+ setFilterColumnData(columnData.filter((item) => typeof item !== "undefined" &&
30
+ item !== "" &&
31
+ `${item}`.toLowerCase().includes(filterSearch.toLowerCase())));
27
32
  }
28
- setFilterColumnData(columnData.filter((item) => typeof item !== "undefined" &&
29
- item !== "" &&
30
- `${item}`.toLowerCase().includes(filterSearch.toLowerCase())));
31
33
  }, [columnData, filterSearch]);
32
34
  const handleSelect = (value, columnKey) => {
33
35
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.212",
3
+ "version": "1.2.214",
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",