-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using a state var for the text of a menu trigger, clicking on it does not display the menu content
To Reproduce
Steps to reproduce the behavior:
"""minimal example showing that state-vars in menu-trigger block display of menu-content"""
import reflex as rx
from rxconfig import config
class State(rx.State):
text:str = "my state-var text"
def index() -> rx.Component:
return rx.hstack(
rx.menu.root(
rx.menu.trigger(rx.button("my text")),
rx.menu.content(rx.menu.item("my menu content")) # is shown
),
rx.menu.root(
rx.menu.trigger(rx.button(State.text)), # shown, but blocks content
rx.menu.content(rx.menu.item("my menu content")), # not shown
),
)
app = rx.App()
app.add_page(index)Expected behavior
Clicking on the button [my state-var text] should show the menu content (like it works when clicking on the button [my text]).
Specifics (please complete the following information):
- Python Version: 3.12.6
- Reflex Version: 0.6.7
- OS: Windows 10
- Browser (Optional): Firefox
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
