I have the same issue as you (not for a <table> though, but with a list of <div>), and there’s a strange behavior when removing an item.
I have the following code:
<main
id="shift-list"
phx-update="stream"
>
<.empty icon="clock-off" class="hidden only:block">
<:title><%= dgettext("events", "No shifts") %></:title>
<:subtitle><%= dgettext("events", "There are no shifts for this event.") %></:subtitle>
</.empty>
<.live_component
:for={{id, shift} <- @streams.shifts}
id={id}
shift={shift}
/>
</main>
Both components are basically <div>. It works fine when there’s only one item or more, my empty state div is hidden, and the items are visible underneath:
Then, when I delete the item, a new empty state is added:
And I think even more are added on each update of the list.
@chrismccord can we put non-stream stuff inside a phx-update="stream" container?
























