@megha-ui/react 1.3.0 → 1.3.1
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.
|
@@ -497,15 +497,15 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
497
497
|
toggleDropdown(((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "");
|
|
498
498
|
}
|
|
499
499
|
}, onChange: (e) => {
|
|
500
|
-
var _a
|
|
501
|
-
let searchType =
|
|
500
|
+
var _a;
|
|
501
|
+
let searchType = "contains";
|
|
502
502
|
if (e.target.value.includes("to")) {
|
|
503
503
|
searchType = "between";
|
|
504
504
|
}
|
|
505
505
|
else if (searchType === "between") {
|
|
506
506
|
searchType = "contains";
|
|
507
507
|
}
|
|
508
|
-
onSearch(((
|
|
508
|
+
onSearch(((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "", e.target.value, searchType);
|
|
509
509
|
}, value: ((_55 = searchQueries[((_54 = headerColumns.find((column) => column.key === _groupBy)) === null || _54 === void 0 ? void 0 : _54.key) || ""]) === null || _55 === void 0 ? void 0 : _55.text) || "", disabled: !((_56 = headerColumns.find((column) => column.key === _groupBy)) === null || _56 === void 0 ? void 0 : _56.search), extraWrapperStyle: {
|
|
510
510
|
background: ((_57 = headerColumns.find((column) => column.key === _groupBy)) === null || _57 === void 0 ? void 0 : _57.search)
|
|
511
511
|
? "var(--background)"
|
|
@@ -745,8 +745,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
745
745
|
pointerEvents: search && column.search ? "auto" : "none",
|
|
746
746
|
cursor: search && column.search ? "default" : "not-allowed",
|
|
747
747
|
}, children: _jsx(TextInput, { onChange: (e) => {
|
|
748
|
-
|
|
749
|
-
let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) || "contains";
|
|
748
|
+
let searchType = "contains";
|
|
750
749
|
if (e.target.value.includes("to")) {
|
|
751
750
|
searchType = "between";
|
|
752
751
|
}
|
package/package.json
CHANGED