hover_card doesn't work when the trigger is an rx.memo'd component
To Reproduce This works:
@rx.page(route="/test_hover/")
def test_hover():
return rx.hover_card.root(
rx.hover_card.trigger(
rx.text("hover me")
),
rx.hover_card.content(
rx.text("Hello, world!")
)
)
But this doesn't (nothing happens when the trigger is hovered over):
@rx.memo
def hover_trigger():
return rx.text("hover me")
@rx.page(route="/test_hover/")
def test_hover():
return rx.hover_card.root(
rx.hover_card.trigger(
hover_trigger()
),
rx.hover_card.content(
rx.text("Hello, world!")
)
)
Edit: It works again if I remove the @rx.memo decorator.
Expected behavior Both code snippets should work the same.
Specifics (please complete the following information):
- Python Version: 3.10.15
- Reflex Version: 0.7.2
Additional context The workaround from another issue https://github.com/reflex-dev/reflex/issues/3278#issuecomment-2109014489 doesn't work here.
You can add a simple rx.el.div in between the memo component and the trigger as a workaround
Thank you, that works. To me, this workaround makes this issue a very low priority. If you decide to close it, I will not be making noise about it.