@megha-ui/react 1.2.615 → 1.2.617
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.
|
@@ -92,7 +92,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
92
92
|
const shouldCover = useMemo(() => {
|
|
93
93
|
if (filterColumns.length > 0) {
|
|
94
94
|
const gridActions = document.querySelector("#grid-action");
|
|
95
|
-
console.log(gridActions);
|
|
96
95
|
return true;
|
|
97
96
|
}
|
|
98
97
|
return true;
|
|
@@ -167,8 +166,9 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
167
166
|
return filterValue.includes(cellValue);
|
|
168
167
|
})
|
|
169
168
|
: true);
|
|
170
|
-
console.log("fixed: ", { _filteredData, fixedFilterValues });
|
|
171
169
|
_filteredData = _filteredData.filter((item) => {
|
|
170
|
+
const orData = filterColumns
|
|
171
|
+
.filter((column) => { var _a; return (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text; });
|
|
172
172
|
return searchOp === "and"
|
|
173
173
|
? filterColumns.every((column) => {
|
|
174
174
|
var _a, _b, _c;
|
|
@@ -247,8 +247,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
247
247
|
return true;
|
|
248
248
|
}
|
|
249
249
|
})
|
|
250
|
-
:
|
|
251
|
-
.filter((column) => { var _a; return (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text; })
|
|
250
|
+
: orData.length > 0 ? orData
|
|
252
251
|
.some((column) => {
|
|
253
252
|
var _a, _b, _c;
|
|
254
253
|
const query = (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text;
|
|
@@ -325,9 +324,8 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
325
324
|
default:
|
|
326
325
|
return true;
|
|
327
326
|
}
|
|
328
|
-
});
|
|
327
|
+
}) : true;
|
|
329
328
|
});
|
|
330
|
-
console.log("searchQueries: ", { _filteredData, searchQueries, searchOp });
|
|
331
329
|
_filteredData = _filteredData.filter((item) => {
|
|
332
330
|
const query = (globalInputSearch || "").toLowerCase().split(",");
|
|
333
331
|
const rowValues = [];
|
|
@@ -345,7 +343,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
345
343
|
return query.some((term) => rowValues.some((value) => value.includes(term)));
|
|
346
344
|
}
|
|
347
345
|
});
|
|
348
|
-
console.log("globalSearch: ", { _filteredData, globalInputSearch });
|
|
349
346
|
_filteredData = _filteredData.filter((item) => filterColumns.some((column) => {
|
|
350
347
|
var _a;
|
|
351
348
|
const query = inputValue || "";
|
|
@@ -354,7 +351,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
354
351
|
: "";
|
|
355
352
|
return value.toLowerCase().includes(query.toLowerCase());
|
|
356
353
|
}));
|
|
357
|
-
console.log("suggestion: ", { _filteredData, inputValue });
|
|
358
354
|
if (hideDuplicates) {
|
|
359
355
|
const visibleColumns = filterColumns.filter((col) => !col.hidden && col.key !== actionsKey);
|
|
360
356
|
if (visibleColumns.length > 0) {
|
|
@@ -1238,7 +1234,7 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1238
1234
|
setUniqueSearch(filterData.uniqueSearch);
|
|
1239
1235
|
setGlobalInputSearch(filterData.globalInputSearch);
|
|
1240
1236
|
setGlobalSearchOp((filterData === null || filterData === void 0 ? void 0 : filterData.globalSearchOp) || "and");
|
|
1241
|
-
setSearchOp((filterData === null || filterData === void 0 ? void 0 : filterData.searchOp) || "
|
|
1237
|
+
setSearchOp((filterData === null || filterData === void 0 ? void 0 : filterData.searchOp) || "and");
|
|
1242
1238
|
setSearchQueries(filterData.searchQueries);
|
|
1243
1239
|
setFixedFilterValues(filterData.fixedFilterValues || {});
|
|
1244
1240
|
}
|
package/package.json
CHANGED