Skip to content

Commit 4dd1177

Browse files
committed
make tooltips not hoverable by default
1 parent 5c25e55 commit 4dd1177

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

reflex_ui/components/base/tooltip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ class TooltipRoot(TooltipBaseComponent):
6565
# How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0.
6666
close_delay: Var[int]
6767

68-
# Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True.
68+
# Whether the tooltip contents can be hovered without closing the tooltip. Defaults to False.
6969
hoverable: Var[bool]
7070

7171
@classmethod
7272
def create(cls, *children, **props) -> BaseUIComponent:
7373
"""Create the tooltip root component."""
7474
props["data-slot"] = "tooltip"
75+
props.setdefault("hoverable", False)
7576
return super().create(*children, **props)
7677

7778

reflex_ui/components/base/tooltip.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class HighLevelTooltip(TooltipRoot):
434434
disabled: Whether the tooltip is disabled. Defaults to False.
435435
delay: How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600.
436436
close_delay: How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0.
437-
hoverable: Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True.
437+
hoverable: Whether the tooltip contents can be hovered without closing the tooltip. Defaults to False.
438438
unstyled: Whether the component should be unstyled
439439
style: The style of the component.
440440
key: A unique key for the component.
@@ -519,7 +519,7 @@ class Tooltip(ComponentNamespace):
519519
disabled: Whether the tooltip is disabled. Defaults to False.
520520
delay: How long to wait before opening the tooltip. Specified in milliseconds. Defaults to 600.
521521
close_delay: How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0.
522-
hoverable: Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True.
522+
hoverable: Whether the tooltip contents can be hovered without closing the tooltip. Defaults to False.
523523
unstyled: Whether the component should be unstyled
524524
style: The style of the component.
525525
key: A unique key for the component.

0 commit comments

Comments
 (0)