Dropdown Issue in LiveView Navigation

113
clicks
Dropdown Issue in LiveView Navigation
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.

© HashMerge 2024