We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Dropdown Issue in LiveView Navigation
128
clicks

Source: reddit.com
InternalAmbassador69 is encountering a problem with a dropdown menu in a Phoenix LiveView application. This dropdown is part of the navigation bar which is not directly a part of LiveView as it's defined in app.html.heex file. After expanding the dropdown and clicking a link, the dropdown collapses and can't be expanded again. The intended behavior is for the dropdown to stay open after navigation. The workaround using `href` solved the issue but with the downside of causing a full page reload, which isn't ideal. Attempts to use `phx-target` did not resolve the issue, and the author is seeking insight or solutions to fix this unexpected dropdown behavior.
Related posts
© HashMerge 2025