@megha-ui/react 1.2.538 → 1.2.539
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,7 +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
|
+
var _a, _b;
|
|
60
60
|
const tooltips = document.querySelectorAll(".react-tooltip");
|
|
61
61
|
let currentTooltip = [];
|
|
62
62
|
tooltips.forEach((value) => {
|
|
@@ -65,14 +65,15 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
currentTooltip = currentTooltip[0];
|
|
68
|
-
const { y
|
|
69
|
-
|
|
70
|
-
if (top && currentTooltip) {
|
|
68
|
+
const { y } = (_a = currentTooltip.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {};
|
|
69
|
+
if (y && currentTooltip) {
|
|
71
70
|
const gridContent = document.querySelector("#grid-content");
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const { height } = (_b = gridContent === null || gridContent === void 0 ? void 0 : gridContent.getBoundingClientRect()) !== null && _b !== void 0 ? _b : {};
|
|
72
|
+
if (height) {
|
|
73
|
+
const availableHeight = height - y;
|
|
74
|
+
const styles = currentTooltip.getAttribute("style");
|
|
75
|
+
currentTooltip.setAttribute("style", `${styles} max-height: ${availableHeight}px; overflow: auto;`);
|
|
76
|
+
}
|
|
76
77
|
}
|
|
77
78
|
}, 50);
|
|
78
79
|
};
|
|
@@ -163,7 +164,10 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
163
164
|
.split(">>")
|
|
164
165
|
.slice(3)
|
|
165
166
|
.map((item) => `<div>${item}</div>`)
|
|
166
|
-
.join("")}</div>`, onMouseEnter: () => {
|
|
167
|
+
.join("")}</div>`, onMouseEnter: () => {
|
|
168
|
+
var _a;
|
|
169
|
+
return checkAvailableForTooltip((_a = item.id.value.toString()) !== null && _a !== void 0 ? _a : colIndex.toString());
|
|
170
|
+
}, children: ["+", " ", cellData.value.toString().split(">>").slice(3)
|
|
167
171
|
.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
|
|
168
172
|
.toString()
|
|
169
173
|
.split(">>")
|
package/package.json
CHANGED