Alan Guzek
Alan Guzek

Reputation: 1

Conditional Embedded Live Views

Hello does anybody know if embedded live views created via:

<%= live_render(@socket, EmbeddedLiveViewModule, id: "embedded") %>

can be run inside conditional flow like this:

<div :if={@render_embedde?}>
    <%= live_render(@socket, EmbeddedLiveViewModule, id: "embedded") %>
</div>

I'll add that this is condition is inside LiveComponent which is inside other LiveView

When I click on button which changes state (at start embedded live view is not shown) it appears. When I try to hide it the assign is changed and my LiveComponent is being rerendered but when I inspect the condition it stills shows previous value

Upvotes: 0

Views: 27

Answers (0)

Related Questions