@megha-ui/react 1.3.82 → 1.3.83
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.
|
@@ -314,7 +314,12 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
314
314
|
const spaceBelow = Math.max(0, Math.floor(rawSpaceBelow));
|
|
315
315
|
const spaceAbove = Math.max(0, Math.floor(rawSpaceAbove));
|
|
316
316
|
const available = Math.max(spaceBelow, spaceAbove);
|
|
317
|
-
|
|
317
|
+
// If there is no positive available space detected (e.g. due to
|
|
318
|
+
// rounding or container calculations), fall back to the preferred
|
|
319
|
+
// max height instead of collapsing the list to 0.
|
|
320
|
+
const resolvedMax = available > 0
|
|
321
|
+
? Math.min(available, preferredMaxHeight)
|
|
322
|
+
: preferredMaxHeight;
|
|
318
323
|
setActiveSearchMaxHeight(resolvedMax);
|
|
319
324
|
};
|
|
320
325
|
if (activeSearchColumn) {
|
|
@@ -625,7 +630,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
625
630
|
var _a, _b, _c;
|
|
626
631
|
const value = ((_a = selected[0]) === null || _a === void 0 ? void 0 : _a.toString()) || "";
|
|
627
632
|
handleSearchOptionSelect((_c = (_b = headerColumns.find((column) => column.key === _groupBy)) === null || _b === void 0 ? void 0 : _b.key) !== null && _c !== void 0 ? _c : "", value);
|
|
628
|
-
}, searchEnabled: false, className: "flex-1", isIcon: true })] }) }), getColumnData(((_61 = headerColumns.find((column) => column.key === _groupBy)) === null || _61 === void 0 ? void 0 : _61.key) || "", gridData, (_63 = (_62 = headerColumns.find((column) => column.key === _groupBy)) === null || _62 === void 0 ? void 0 : _62.dataType) !== null && _63 !== void 0 ? _63 : "string", combinedColumns !== null && combinedColumns !== void 0 ? combinedColumns : []).length > 0 &&
|
|
633
|
+
}, dropdownListWidth: "max-content", searchEnabled: false, className: "flex-1", isIcon: true })] }) }), getColumnData(((_61 = headerColumns.find((column) => column.key === _groupBy)) === null || _61 === void 0 ? void 0 : _61.key) || "", gridData, (_63 = (_62 = headerColumns.find((column) => column.key === _groupBy)) === null || _62 === void 0 ? void 0 : _62.dataType) !== null && _63 !== void 0 ? _63 : "string", combinedColumns !== null && combinedColumns !== void 0 ? combinedColumns : []).length > 0 &&
|
|
629
634
|
activeSearchColumn ===
|
|
630
635
|
(((_64 = headerColumns.find((column) => column.key === _groupBy)) === null || _64 === void 0 ? void 0 : _64.key) || "") && (_jsx("div", { ref: activeSearchListRef, style: {
|
|
631
636
|
position: "absolute",
|
|
@@ -951,7 +956,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
951
956
|
(((_b = searchQueries[(_a = column === null || column === void 0 ? void 0 : column.key) !== null && _a !== void 0 ? _a : ""]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
952
957
|
defaultSearchOperation ||
|
|
953
958
|
"contains");
|
|
954
|
-
})) === null || _w === void 0 ? void 0 : _w.label) !== null && _x !== void 0 ? _x : "", withValue: true, searchEnabled: false, className: "flex-1", isIcon: true })] }) }), columnData.length > 0 &&
|
|
959
|
+
})) === null || _w === void 0 ? void 0 : _w.label) !== null && _x !== void 0 ? _x : "", withValue: true, searchEnabled: false, className: "flex-1", dropdownListWidth: "max-content", isIcon: true })] }) }), columnData.length > 0 &&
|
|
955
960
|
activeSearchColumn === ((column === null || column === void 0 ? void 0 : column.key) || "") && (_jsxs("div", { ref: activeSearchListRef, style: {
|
|
956
961
|
position: "absolute",
|
|
957
962
|
top: "calc(100% + 0.25rem)",
|
package/package.json
CHANGED