@megha-ui/react 1.2.515 → 1.2.517
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.
|
@@ -56,6 +56,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
56
56
|
}, [columns]);
|
|
57
57
|
const checkAvailableForTooltip = (id) => {
|
|
58
58
|
setTimeout(() => {
|
|
59
|
+
var _a;
|
|
59
60
|
const tooltips = document.querySelectorAll(".react-tooltip");
|
|
60
61
|
let currentTooltip = [];
|
|
61
62
|
tooltips.forEach((value) => {
|
|
@@ -64,7 +65,11 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
67
|
currentTooltip = currentTooltip[0];
|
|
67
|
-
|
|
68
|
+
const { top } = (_a = currentTooltip.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {};
|
|
69
|
+
if (top && currentTooltip) {
|
|
70
|
+
const availableHeight = window.innerHeight - top;
|
|
71
|
+
currentTooltip.setAttribute("max-height", `${availableHeight}px`);
|
|
72
|
+
}
|
|
68
73
|
}, 50);
|
|
69
74
|
};
|
|
70
75
|
return isExpandable &&
|
|
@@ -155,7 +160,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
155
160
|
.slice(3)
|
|
156
161
|
.map((item) => `<div>${item}</div>`)
|
|
157
162
|
.join("")}</div>`, onMouseEnter: () => { var _a; return checkAvailableForTooltip((_a = item.id.value.toString()) !== null && _a !== void 0 ? _a : colIndex.toString()); }, children: ["+", " ", cellData.value.toString().split(">>").slice(3)
|
|
158
|
-
.length, " ", "more"] })), _jsx(Tooltip, { className: "custom-tooltip", clickable: true, id: (_b = item.id.value.toString()) !== null && _b !== void 0 ? _b : colIndex.toString(), place: "top" })] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { "data-tooltip-id": (_c = item.id.value.toString()) !== null && _c !== void 0 ? _c : colIndex.toString(), "data-tooltip-html": `<div class="flex flex-col">${cellData.value
|
|
163
|
+
.length, " ", "more"] })), _jsx(Tooltip, { className: "custom-tooltip", clickable: true, isOpen: index === 0, id: (_b = item.id.value.toString()) !== null && _b !== void 0 ? _b : colIndex.toString(), place: "top" })] })) : (_jsxs(_Fragment, { children: [_jsxs("span", { "data-tooltip-id": (_c = item.id.value.toString()) !== null && _c !== void 0 ? _c : colIndex.toString(), "data-tooltip-html": `<div class="flex flex-col">${cellData.value
|
|
159
164
|
.toString()
|
|
160
165
|
.split(">>")
|
|
161
166
|
.map((item) => `<div>${item}</div>`)
|
package/package.json
CHANGED