Hi,
I have a problem where i have a stream that resets in a child liveview.
The liveview is sticky and i’m redirecting to a different liveview in the same live_session. So the liveview is not remounted.
I have defined the stream like this:
<div
id={"auction-#{@active_auction_id}-messages"}
phx-update="stream"
data-page={@query_params["page"]}
class="min-w-[28rem] flex h-full grow flex-col gap-2 overflow-auto overflow-x-clip scroll-auto bg-white px-6 py-3 pb-2"
>
<.chat_line
:for={{dom_id, message} <- @streams.messages}
id={dom_id}
message={message}
is_from_self={message.is_from_self}
auction_id={@active_auction_id}
/>
</div>
It is only the children/chat-line that disappears.
How i call the liveview
<%= live_render(@socket, MyProject.ChatLive.Chat,
id: "chats",
session: %{"user_id" => @user.id, "active_path" => @path},
sticky: true
) %>
I can’t seem to find the reason for the reset, so i hope someone can help.