@megha-ui/react 1.2.153 → 1.2.155

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.
@@ -46,7 +46,6 @@ const useSort = (data, columns, uniqueSearch, multiSorting, withAscii) => {
46
46
  return false;
47
47
  });
48
48
  });
49
- console.log(returnData, uniqueSearch);
50
49
  return returnData;
51
50
  }, [data, sortQueries, uniqueSearch]);
52
51
  const handleSort = (column, order) => {
@@ -96,10 +96,23 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
96
96
  };
97
97
  (0, react_1.useEffect)(() => {
98
98
  const closeMenu = (e) => {
99
+ var _a;
99
100
  const target = e.target;
100
101
  if (target.closest(".filter-icon")) {
101
102
  return;
102
103
  }
104
+ if (dropdownVisible) {
105
+ const column = columns.find(item => item.key === dropdownVisible);
106
+ if (column) {
107
+ console.log(column, uniqueSearch[column.key]);
108
+ if (((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[column.key]) === null || _a === void 0 ? void 0 : _a.length) > 0 && uniqueSearch[column.key].every(item => { var _a; return (0, exports.getColumnData)(column.key, gridData, (_a = column.dataType) !== null && _a !== void 0 ? _a : "string"); })) {
109
+ setUniqueSearch((prev) => {
110
+ delete prev[column.key];
111
+ return prev;
112
+ });
113
+ }
114
+ }
115
+ }
103
116
  setMenuVisible("");
104
117
  setDropdownVisible("");
105
118
  setMenuPosition(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.153",
3
+ "version": "1.2.155",
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.mjs",