@megha-ui/react 1.2.141 → 1.2.143
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.
|
@@ -38,7 +38,6 @@ const useSort = (data, columns, uniqueSearch, multiSorting, withAscii) => {
|
|
|
38
38
|
let returnData = [...data];
|
|
39
39
|
const _sortQueries = sortQueries;
|
|
40
40
|
returnData = returnData.sort(hierarchicalSort(Object.keys(_sortQueries), Object.values(_sortQueries)));
|
|
41
|
-
console.log(returnData, _sortQueries);
|
|
42
41
|
returnData = returnData.filter((data) => {
|
|
43
42
|
return keys.every((key) => {
|
|
44
43
|
if (uniqueSearch[key].length > 0) {
|
|
@@ -169,6 +169,7 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
169
169
|
return filterValue.includes(cellValue);
|
|
170
170
|
})
|
|
171
171
|
: true);
|
|
172
|
+
console.log(searchQueries);
|
|
172
173
|
_filteredData = _filteredData.filter((item) => searchOp === "and"
|
|
173
174
|
? filterColumns.every((column) => {
|
|
174
175
|
var _a, _b, _c;
|
|
@@ -751,7 +752,6 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
|
|
|
751
752
|
}
|
|
752
753
|
}, [filteredData, gridGroupBy, gridColumns]);
|
|
753
754
|
const handleSearch = (0, react_1.useCallback)((key, value, type) => {
|
|
754
|
-
console.log(value);
|
|
755
755
|
setSearchQueries((prev) => (Object.assign(Object.assign({}, prev), { [key]: { text: value, type, operation: "and" } })));
|
|
756
756
|
}, []);
|
|
757
757
|
(0, react_1.useEffect)(() => {
|
|
@@ -45,7 +45,6 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
|
|
|
45
45
|
else {
|
|
46
46
|
_uniqueSeach = Object.assign(Object.assign({}, uniqueSearch), { [columnKey]: columnData });
|
|
47
47
|
}
|
|
48
|
-
console.log(_uniqueSeach);
|
|
49
48
|
setUniqueSearch(_uniqueSeach);
|
|
50
49
|
}
|
|
51
50
|
else {
|
|
@@ -59,7 +58,6 @@ const GridFilterDropdown = ({ headerDropdownIndex, searchOptions, position, colu
|
|
|
59
58
|
}
|
|
60
59
|
onFilter(_uniqueSeach, columnKey);
|
|
61
60
|
};
|
|
62
|
-
console.log({ locale, formatOptions });
|
|
63
61
|
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: {
|
|
64
62
|
padding: "0.5rem 0.75rem",
|
|
65
63
|
cursor: "pointer",
|
package/package.json
CHANGED