From 12a7fe2d8a5e869243e1f9e99e8203027a3736f4 Mon Sep 17 00:00:00 2001 From: akarras Date: Wed, 19 Jun 2024 22:31:04 -0600 Subject: [PATCH] only show tooltip if not empty text --- ultros-frontend/ultros-app/src/components/tooltip.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ultros-frontend/ultros-app/src/components/tooltip.rs b/ultros-frontend/ultros-app/src/components/tooltip.rs index 069ce979..bf07cdb4 100644 --- a/ultros-frontend/ultros-app/src/components/tooltip.rs +++ b/ultros-frontend/ultros-app/src/components/tooltip.rs @@ -45,7 +45,8 @@ pub fn Tooltip( let tooltip = { move || { - is_hover.get().then(move || { + (tooltip_text.with(|t| !t.is_empty()) && + is_hover.get()).then(move || { let (screen_width, screen_height) = use_window_size(); let (scroll_x, scroll_y) = use_window_scroll(); let node_ref = create_node_ref::
();