@megha-ui/react 1.2.121 → 1.2.122

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.
@@ -10,7 +10,7 @@ const textFilterDropdown_1 = __importDefault(require("./textFilterDropdown"));
10
10
  const text_input_1 = __importDefault(require("../../text-input"));
11
11
  const checkbox_1 = __importDefault(require("../../checkbox"));
12
12
  const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, columnKey, searchElement, activeSearchType, textFilterLabel, columnData, checkboxWrapper, onFilter, setUniqueSearch, uniqueSearch, sortingOps, searchable, searchInput, columnIndex, }) => {
13
- var _a, _b, _c;
13
+ var _a, _b, _c, _d;
14
14
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
15
15
  const [filterColumnData, setFilterColumnData] = (0, react_1.useState)([]);
16
16
  const [filterSearch, setFilterSearch] = (0, react_1.useState)("");
@@ -37,8 +37,8 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
37
37
  var _a;
38
38
  let _uniqueSeach = {};
39
39
  if (value === "all") {
40
- console.log({ uniqueSearch, columnKey, columnData, shouldALL: uniqueSearch[columnKey].every((item) => columnData.includes(item)) });
41
- if (((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 && uniqueSearch[columnKey].every((item) => columnData.includes(item))) {
40
+ if (((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
41
+ uniqueSearch[columnKey].every((item) => columnData.includes(item))) {
42
42
  _uniqueSeach = Object.assign(Object.assign({}, uniqueSearch), { [columnKey]: [] });
43
43
  }
44
44
  else {
@@ -73,9 +73,9 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
73
73
  cursor: "pointer",
74
74
  display: "flex",
75
75
  alignItems: "center",
76
- }, onClick: () => handleSelect("all", columnKey), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: uniqueSearch[columnKey] && uniqueSearch[columnKey].every((item) => columnData.includes(item)), indeterminate: (uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) &&
77
- ((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
78
- !uniqueSearch[columnKey].every((item) => columnData.includes(item)), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "0.5rem" }, children: "All" })] }), filterColumnData.map((item) => {
76
+ }, onClick: () => handleSelect("all", columnKey), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: ((_a = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
77
+ uniqueSearch[columnKey].every((item) => columnData.includes(item)), indeterminate: ((_b = uniqueSearch === null || uniqueSearch === void 0 ? void 0 : uniqueSearch[columnKey]) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
78
+ uniqueSearch[columnKey].some((item) => columnData.includes(item)), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }), (0, jsx_runtime_1.jsx)("span", { style: { marginLeft: "0.5rem" }, children: "All" })] }), filterColumnData.map((item) => {
79
79
  var _a;
80
80
  return ((0, jsx_runtime_1.jsxs)("div", { style: {
81
81
  cursor: "pointer",
@@ -85,8 +85,8 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
85
85
  })] }))] })), isOpen && ((0, jsx_runtime_1.jsx)(textFilterDropdown_1.default, { combined: true, columnIndex: columnIndex, headerDropdownIndex: headerDropdownIndex || 1001, searchOptions: searchOptions, position: position
86
86
  ? {
87
87
  top: position.top,
88
- left: ((_b = headerDropdown === null || headerDropdown === void 0 ? void 0 : headerDropdown.current) === null || _b === void 0 ? void 0 : _b.clientWidth)
89
- ? ((_c = headerDropdown === null || headerDropdown === void 0 ? void 0 : headerDropdown.current) === null || _c === void 0 ? void 0 : _c.clientWidth) + 2 + position.left
88
+ left: ((_c = headerDropdown === null || headerDropdown === void 0 ? void 0 : headerDropdown.current) === null || _c === void 0 ? void 0 : _c.clientWidth)
89
+ ? ((_d = headerDropdown === null || headerDropdown === void 0 ? void 0 : headerDropdown.current) === null || _d === void 0 ? void 0 : _d.clientWidth) + 2 + position.left
90
90
  : position.left,
91
91
  }
92
92
  : { top: 0, left: 0 }, columnKey: columnKey, searchElement: searchElement, activeSearchType: activeSearchType, searchable: searchable }))] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.121",
3
+ "version": "1.2.122",
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",