@megha-ui/react 1.3.113 → 1.3.115
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.
|
@@ -399,7 +399,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
399
399
|
: density === "compact"
|
|
400
400
|
? "2rem"
|
|
401
401
|
: "2.5rem"})`,
|
|
402
|
-
})), { position: "relative" }), style), children: [_jsxs("div", { style: Object.assign(
|
|
402
|
+
})), { position: "relative" }), style), children: [_jsxs("div", { style: Object.assign({ border: (_c = style === null || style === void 0 ? void 0 : style.border) !== null && _c !== void 0 ? _c : border }, { borderRadius: 4, display: "flex", alignItems: "center", justifyContent: "space-between", cursor: "pointer", width: width ? "100%" : "max-content", padding: "0.5rem" }), ref: clearIconRef, onClick: handleClick, children: [_jsx("span", { style: {
|
|
403
403
|
display: isIcon
|
|
404
404
|
? withValue
|
|
405
405
|
? "inline-block"
|
|
@@ -94,10 +94,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
setMenuVisible("");
|
|
97
|
-
setDropdownVisible("");
|
|
98
97
|
setMenuPosition(null);
|
|
99
98
|
setSearchOpsPosition(null);
|
|
100
|
-
if (!target.closest(".column-search-outside-wrapper")
|
|
99
|
+
if (!target.closest(".column-search-outside-wrapper") &&
|
|
100
|
+
activeSearchColumn !== "") {
|
|
101
|
+
setActiveSearchColumn(null);
|
|
102
|
+
setDropdownVisible("");
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
101
105
|
setActiveSearchColumn(null);
|
|
102
106
|
}
|
|
103
107
|
};
|
|
@@ -431,21 +435,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
431
435
|
searchType = "endsWith";
|
|
432
436
|
}
|
|
433
437
|
}
|
|
434
|
-
|
|
435
|
-
if (query &&
|
|
436
|
-
!query.includes("%") &&
|
|
437
|
-
!query.includes("_")) {
|
|
438
|
-
if (searchType === "contains") {
|
|
439
|
-
query = `%${query}%`;
|
|
440
|
-
}
|
|
441
|
-
else if (searchType === "startsWith") {
|
|
442
|
-
query = `${query}%`;
|
|
443
|
-
}
|
|
444
|
-
else if (searchType === "endsWith") {
|
|
445
|
-
query = `%${query}`;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
onSearch(currentKey, query, searchType);
|
|
438
|
+
onSearch(currentKey, input, searchType);
|
|
449
439
|
}, onBlur: (e) => {
|
|
450
440
|
var _a, _b;
|
|
451
441
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
@@ -612,21 +602,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
612
602
|
searchType = "endsWith";
|
|
613
603
|
}
|
|
614
604
|
}
|
|
615
|
-
|
|
616
|
-
if (query &&
|
|
617
|
-
!query.includes("%") &&
|
|
618
|
-
!query.includes("_")) {
|
|
619
|
-
if (searchType === "contains") {
|
|
620
|
-
query = `%${query}%`;
|
|
621
|
-
}
|
|
622
|
-
else if (searchType === "startsWith") {
|
|
623
|
-
query = `${query}%`;
|
|
624
|
-
}
|
|
625
|
-
else if (searchType === "endsWith") {
|
|
626
|
-
query = `%${query}`;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
onSearch(currentKey, query, searchType);
|
|
605
|
+
onSearch(currentKey, input, searchType);
|
|
630
606
|
}, onBlur: (e) => {
|
|
631
607
|
var _a, _b;
|
|
632
608
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
@@ -791,21 +767,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
791
767
|
searchType = "endsWith";
|
|
792
768
|
}
|
|
793
769
|
}
|
|
794
|
-
|
|
795
|
-
if (query &&
|
|
796
|
-
!query.includes("%") &&
|
|
797
|
-
!query.includes("_")) {
|
|
798
|
-
if (searchType === "contains") {
|
|
799
|
-
query = `%${query}%`;
|
|
800
|
-
}
|
|
801
|
-
else if (searchType === "startsWith") {
|
|
802
|
-
query = `${query}%`;
|
|
803
|
-
}
|
|
804
|
-
else if (searchType === "endsWith") {
|
|
805
|
-
query = `%${query}`;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
onSearch(currentKey, query, searchType);
|
|
770
|
+
onSearch(currentKey, input, searchType);
|
|
809
771
|
}, onBlur: (e) => {
|
|
810
772
|
var _a, _b;
|
|
811
773
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
@@ -1009,21 +971,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1009
971
|
searchType = "endsWith";
|
|
1010
972
|
}
|
|
1011
973
|
}
|
|
1012
|
-
|
|
1013
|
-
if (query &&
|
|
1014
|
-
!query.includes("%") &&
|
|
1015
|
-
!query.includes("_")) {
|
|
1016
|
-
if (searchType === "contains") {
|
|
1017
|
-
query = `%${query}%`;
|
|
1018
|
-
}
|
|
1019
|
-
else if (searchType === "startsWith") {
|
|
1020
|
-
query = `${query}%`;
|
|
1021
|
-
}
|
|
1022
|
-
else if (searchType === "endsWith") {
|
|
1023
|
-
query = `%${query}`;
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
onSearch(column.key, query, searchType);
|
|
974
|
+
onSearch(column.key, input, searchType);
|
|
1027
975
|
}, onBlur: (e) => {
|
|
1028
976
|
var _a;
|
|
1029
977
|
const currentKey = (column === null || column === void 0 ? void 0 : column.key) || "";
|
|
@@ -1151,21 +1099,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1151
1099
|
searchType = "endsWith";
|
|
1152
1100
|
}
|
|
1153
1101
|
}
|
|
1154
|
-
|
|
1155
|
-
if (query &&
|
|
1156
|
-
!query.includes("%") &&
|
|
1157
|
-
!query.includes("_")) {
|
|
1158
|
-
if (searchType === "contains") {
|
|
1159
|
-
query = `%${query}%`;
|
|
1160
|
-
}
|
|
1161
|
-
else if (searchType === "startsWith") {
|
|
1162
|
-
query = `${query}%`;
|
|
1163
|
-
}
|
|
1164
|
-
else if (searchType === "endsWith") {
|
|
1165
|
-
query = `%${query}`;
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
onSearch(column.key, query, searchType);
|
|
1102
|
+
onSearch(column.key, input, searchType);
|
|
1169
1103
|
}, onBlur: (e) => {
|
|
1170
1104
|
var _a;
|
|
1171
1105
|
const currentKey = (column === null || column === void 0 ? void 0 : column.key) || "";
|
package/package.json
CHANGED