@megha-ui/react 1.2.127 → 1.2.130

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.
@@ -750,6 +750,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
750
750
  }
751
751
  }, [filteredData, gridGroupBy, gridColumns]);
752
752
  const handleSearch = (0, react_1.useCallback)((key, value, type) => {
753
+ console.log(value);
753
754
  setSearchQueries((prev) => (Object.assign(Object.assign({}, prev), { [key]: { text: value, type, operation: "and" } })));
754
755
  }, []);
755
756
  (0, react_1.useEffect)(() => {
@@ -59,7 +59,7 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
59
59
  }
60
60
  onFilter(_uniqueSeach, columnKey);
61
61
  };
62
- return ((0, jsx_runtime_1.jsxs)("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "white", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.35rem 0", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), ref: headerDropdown, onClick: (e) => e.stopPropagation(), children: [searchInput && searchInput, (0, jsx_runtime_1.jsxs)("div", { style: {
62
+ return ((0, jsx_runtime_1.jsxs)("div", { style: Object.assign(Object.assign({ position: "absolute", top: "calc(100% + 5px)" }, (columnIndex > 1 ? { right: 0 } : { left: 0 })), { zIndex: headerDropdownIndex ? headerDropdownIndex : 1000, backgroundColor: "white", boxShadow: "0px 0.5rem 1rem 0px rgba(0,0,0,0.2)", listStyleType: "none", padding: "0.35rem 0", width: "max-content", maxWidth: "500px", borderRadius: "0.5rem", margin: 0 }), ref: headerDropdown, onClick: (e) => e.stopPropagation(), children: [searchInput && searchInput, sortingOps, (0, jsx_runtime_1.jsxs)("div", { style: {
63
63
  padding: "0.5rem 0.75rem",
64
64
  cursor: "pointer",
65
65
  display: "flex",
@@ -60,17 +60,17 @@ const getColumnData = (columnKey, gridData, type) => {
60
60
  ];
61
61
  return returnedValue.sort((a, b) => {
62
62
  const aValue = a
63
- ? type === "number"
63
+ ? type === "number" || type === "currency"
64
64
  ? parseFloat(a === null || a === void 0 ? void 0 : a.toString())
65
65
  : a === null || a === void 0 ? void 0 : a.toString().toUpperCase()
66
- : type === "number"
66
+ : type === "number" || type === "currency"
67
67
  ? 0
68
68
  : "";
69
69
  const bValue = b
70
- ? type === "number"
70
+ ? type === "number" || type === "currency"
71
71
  ? parseFloat(b === null || b === void 0 ? void 0 : b.toString())
72
72
  : b === null || b === void 0 ? void 0 : b.toString().toUpperCase()
73
- : type === "number"
73
+ : type === "number" || type === "currency"
74
74
  ? 0
75
75
  : "";
76
76
  if (aValue < bValue)
@@ -138,8 +138,8 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
138
138
  toggleDropdown(columnKey);
139
139
  };
140
140
  const menuOptions = [
141
- { label: "Sort Ascending", action: onSort, order: "asc" },
142
- { label: "Sort Descending", action: onSort, order: "dsc" },
141
+ // { label: "Sort Ascending", action: onSort, order: "asc" },
142
+ // { label: "Sort Descending", action: onSort, order: "dsc" },
143
143
  { label: "Group by", groupBy: setGroupBy },
144
144
  ];
145
145
  const searchOptions = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.127",
3
+ "version": "1.2.130",
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",