@megha-ui/react 1.2.128 → 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",
|
|
@@ -58,7 +58,6 @@ const getColumnData = (columnKey, gridData, type) => {
|
|
|
58
58
|
: data[columnKey].value
|
|
59
59
|
: data[columnKey].value)),
|
|
60
60
|
];
|
|
61
|
-
console.log({ returnedValue });
|
|
62
61
|
return returnedValue.sort((a, b) => {
|
|
63
62
|
const aValue = a
|
|
64
63
|
? type === "number" || type === "currency"
|
|
@@ -139,8 +138,8 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
139
138
|
toggleDropdown(columnKey);
|
|
140
139
|
};
|
|
141
140
|
const menuOptions = [
|
|
142
|
-
{ label: "Sort Ascending", action: onSort, order: "asc" },
|
|
143
|
-
{ label: "Sort Descending", action: onSort, order: "dsc" },
|
|
141
|
+
// { label: "Sort Ascending", action: onSort, order: "asc" },
|
|
142
|
+
// { label: "Sort Descending", action: onSort, order: "dsc" },
|
|
144
143
|
{ label: "Group by", groupBy: setGroupBy },
|
|
145
144
|
];
|
|
146
145
|
const searchOptions = [
|
package/package.json
CHANGED