Describe the bug
When implementing the on_click event in rx.chakra.button within the rx.hover_card.root, the hover_card.trigger stops working.
To Reproduce
The code is as follows:
rx.hover_card.root(
rx.hover_card.trigger(
rx.chakra.button("Single Search", flex_grow="1", style={"background_color": "#2e5397", "color": "white"}, size="lg", on_click=my_on_click_handler)
),
rx.hover_card.content(
rx.text("Find the SSOC code for a single job title and job description", style={"font_weight": "bold", "color": "white"}),
side="left",
align="center",
style={"background": "#C55B11"}
),
)
my_on_click_handler just redirects the user to another page.
def my_on_click_handler():
# Define what happens when the button is clicked
return rx.redirect("/singlesearch")
Expected behavior
The hover_card.trigger should continue to work as intended, even when the on_click event is implemented in the rx.chakra.button. The hover_card.trigger should display the hover card content when the button is hovered over, and the on_click event of the button should trigger the specified my_on_click_handler function.
Screenshots
Ideally, the hover card should still appear like so:
Describe the bug When implementing the on_click event in rx.chakra.button within the rx.hover_card.root, the hover_card.trigger stops working.
To Reproduce The code is as follows:
my_on_click_handler just redirects the user to another page.
Expected behavior The hover_card.trigger should continue to work as intended, even when the on_click event is implemented in the rx.chakra.button. The hover_card.trigger should display the hover card content when the button is hovered over, and the on_click event of the button should trigger the specified my_on_click_handler function.
Screenshots Ideally, the hover card should still appear like so:![Screenshot 2024-02-27 153542](https://github.com/reflex-dev/reflex/assets/44826548/7267cad7-6fa4-46aa-95ec-2ace65f2fd66)