Fixed toolip
This commit is contained in:
@@ -190,7 +190,7 @@ function bindTooltipsWithDelegation(elementId) {
|
||||
|
||||
// Add a single mouseenter and mouseleave listener to the parent element
|
||||
element.addEventListener("mouseenter", (event) => {
|
||||
// OPTIMIZATION C: Early exit - check mf-no-tooltip FIRST (before any DOM work)
|
||||
// Early exit - check mf-no-tooltip FIRST (before any DOM work)
|
||||
if (element.hasAttribute("mf-no-tooltip")) {
|
||||
return;
|
||||
}
|
||||
@@ -243,14 +243,14 @@ function bindTooltipsWithDelegation(elementId) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}); // OPTIMIZATION C: Removed capture phase (not needed)
|
||||
}, true); // Capture phase required: mouseenter doesn't bubble
|
||||
|
||||
element.addEventListener("mouseleave", (event) => {
|
||||
const cell = event.target.closest("[data-tooltip]");
|
||||
if (cell) {
|
||||
tooltipContainer.setAttribute("data-visible", "false");
|
||||
}
|
||||
}); // OPTIMIZATION C: Removed capture phase (not needed)
|
||||
}, true); // Capture phase required: mouseleave doesn't bubble
|
||||
}
|
||||
|
||||
function initLayout(elementId) {
|
||||
|
||||
@@ -307,10 +307,12 @@ class DataGrid(MultipleInstance):
|
||||
if not col_def.visible:
|
||||
return OptimizedDiv(cls="dt2-col-hidden")
|
||||
|
||||
value = self._state.ns_fast_access[col_def.col_id][row_index]
|
||||
content = self.mk_body_cell_content(col_pos, row_index, col_def, filter_keyword_lower)
|
||||
|
||||
return OptimizedDiv(content,
|
||||
data_col=col_def.col_id,
|
||||
data_tooltip=str(value),
|
||||
style=f"width:{col_def.width}px;",
|
||||
cls="dt2-cell")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user