@megha-ui/react 1.2.501 → 1.2.505
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.
|
@@ -54,6 +54,16 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
54
54
|
}
|
|
55
55
|
setDraggableIndex(_dragIndex);
|
|
56
56
|
}, [columns]);
|
|
57
|
+
const checkAvailableForTooltip = (id) => {
|
|
58
|
+
const tooltips = document.querySelectorAll(".react-tooltip");
|
|
59
|
+
const currentTooltip = [];
|
|
60
|
+
tooltips.forEach((value) => {
|
|
61
|
+
if (value.id === id) {
|
|
62
|
+
currentTooltip.push(value);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
console.log(currentTooltip);
|
|
66
|
+
};
|
|
57
67
|
return isExpandable &&
|
|
58
68
|
((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.value) &&
|
|
59
69
|
expandedRow === ((_b = item === null || item === void 0 ? void 0 : item.id) === null || _b === void 0 ? void 0 : _b.value) &&
|
|
@@ -141,7 +151,7 @@ const GridRow = ({ item, rowStyle, cellStyle, rowHeight, bulkSelect, selectedRow
|
|
|
141
151
|
.split(">>")
|
|
142
152
|
.slice(3)
|
|
143
153
|
.map((item) => `<div>${item}</div>`)
|
|
144
|
-
.join("")}</div>`, children: ["+", " ", cellData.value.toString().split(">>").slice(3)
|
|
154
|
+
.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)
|
|
145
155
|
.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
|
|
146
156
|
.toString()
|
|
147
157
|
.split(">>")
|
package/package.json
CHANGED