@megha-ui/react 1.2.45 → 1.2.47

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.
@@ -26,10 +26,11 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
26
26
  }
27
27
  }, []);
28
28
  (0, react_1.useEffect)(() => {
29
- if (typeof uniqueSearch[columnKey] === "undefined" && columnData.length > 0) {
29
+ if (typeof uniqueSearch[columnKey] === "undefined" &&
30
+ columnData.length > 0) {
30
31
  setUniqueSearch((prev) => (Object.assign(Object.assign({}, prev), { [columnKey]: columnData })));
31
32
  }
32
- setFilterColumnData(columnData);
33
+ setFilterColumnData(columnData.filter((item) => item));
33
34
  }, [columnData]);
34
35
  (0, react_1.useEffect)(() => {
35
36
  setFilterColumnData(columnData.filter((item) => `${item}`.toLowerCase().includes(filterSearch.toLowerCase())));
@@ -67,7 +68,7 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
67
68
  maxHeight: 300,
68
69
  overflow: "auto",
69
70
  padding: "0.5rem 0.75rem",
70
- }, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsx)(text_input_1.default, { placeholder: `filter`, onChange: (e) => setFilterSearch(e.target.value), value: filterSearch, height: 32, width: "100%", className: "w-full", backgroundColor: "#fff" }) }), columnData.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: {
71
+ }, children: [(0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsx)(text_input_1.default, { placeholder: `filter`, onChange: (e) => setFilterSearch(e.target.value), value: filterSearch, height: 32, width: "100%", className: "w-full", backgroundColor: "#fff" }) }), filterColumnData.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: {
71
72
  cursor: "pointer",
72
73
  display: "flex",
73
74
  alignItems: "center",
@@ -49,7 +49,7 @@ const checkbox_1 = __importDefault(require("../../checkbox"));
49
49
  const getColumnData = (columnKey, gridData, type) => {
50
50
  const returnedValue = [
51
51
  ...new Set(gridData
52
- .filter((item) => item[columnKey] && item[columnKey].value)
52
+ .filter((item) => item[columnKey] && typeof item[columnKey].value !== "undefined")
53
53
  .map((data) => data[columnKey] &&
54
54
  data[columnKey].value &&
55
55
  typeof data[columnKey].value === "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.45",
3
+ "version": "1.2.47",
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",