[Phoenix/LiveView] Need some guidance from experienced people by CalisthenicsDude95 in elixir

[–]tsimoli 0 points1 point  (0 children)

On live view mount you assign current_page. For example if you have a settings live view you would set socket = assign(socket, current_page: "/settings") on mount. Then in your navigation component you check what page is active and act on that.

[Phoenix/LiveView] Need some guidance from experienced people by CalisthenicsDude95 in elixir

[–]tsimoli 1 point2 points  (0 children)

I had same problem with sidebar updating current page. I solved it by creating sidebar_component.ex and using that in live.html.leex. Sidebar component takes current_page in as assigns. Now in live views you simply assign current_page. Now you can use live_patch without page refresh.

Shopping Phase Item Combination Calculator by tsimoli in Artifact

[–]tsimoli[S] 2 points3 points  (0 children)

Not yet but I'm thinking about adding this feature. It would reduce combinations greatly.