We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I render my liveview like this:
<table> <%= for item <- section.items do %> <%= live_render(@socket, AppWeb.Live.Checklist.TaskRow, container: {:tbody, []}, child_id: item.id, session: %{account: @account, user: @user, checklist: @checklist, item: item}) %> <% end %> </table>
As you can see, I use the container property to prevent the creation of a <div> inside <table>.
container
<div>
<table>
The problem is that static_render,disconnected_nested_static_render and connected_nested_static_render always create <div class="phx-loader"></div>.
static_render
disconnected_nested_static_render
connected_nested_static_render
<div class="phx-loader"></div>
The JS lib uses
phoenix_live_view/assets/js/phoenix_live_view.js
Line 680 in 93c5611
When I change the <div> in static_render,disconnected_nested_static_render and connected_nested_static_render to this:
<%= Phoenix.HTML.Tag.content_tag(tag, "", [class: "phx-loader"]) %>
it continues.
The HTML is valid, but now the first load from the Websocket removes the <tr> and produces invalid HTML again:
<tr>
There is no <tr> tag anymore:
LiveView doesn't play nicely when the LV is a table row. I think it's a common usecase for LV's.
The text was updated successfully, but these errors were encountered:
This will be fixed soon, when the pushstate stuff lands where I have updated the loader to use the existing container and css pseudo elements. Thanks!
Sorry, something went wrong.
Dup of #193
No branches or pull requests
Environment
Actual behavior
I render my liveview like this:
As you can see, I use the
container
property to prevent the creation of a<div>
inside<table>
.The problem is that
static_render
,disconnected_nested_static_render
andconnected_nested_static_render
always create<div class="phx-loader"></div>
.The JS lib uses
phoenix_live_view/assets/js/phoenix_live_view.js
Line 680 in 93c5611
to find that loader and that doesn't work when it's a div (as it's invalid to have a div inside a table).
When I change the
<div>
instatic_render
,disconnected_nested_static_render
andconnected_nested_static_render
to this:it continues.
The HTML is valid, but now the first load from the Websocket removes the
<tr>
and produces invalid HTML again:There is no
<tr>
tag anymore:Expected behavior
LiveView doesn't play nicely when the LV is a table row. I think it's a common usecase for LV's.
The text was updated successfully, but these errors were encountered: