-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
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
Reload Lazy-loading Turbo Frames #58
Comments
Setting the |
Hey Tony, with morph it should reload the turbo-frames too. I have tested this myself on one of our apps. Since morph replaces the "connected" attribute of the turbo frame, that triggers a reconnect. Are you getting a different behavior here? |
Oh, I've just tested again and looks like it's working. It might have been something on my end, sorry. |
I think I found the issue. It works when we're not using full URL in the src attribute. So, if the Turbo Frame's src attribute points to <p style="color: green"><%= notice %></p>
<% content_for :title, "Messages" %>
<h1>Messages</h1>
<div id="messages">
<% @messages.each do |message| %>
<%= render message %>
<p>
<%= link_to "Show this message", message %>
</p>
<% end %>
</div>
<%= turbo_frame_tag "create_message", src: "http://localhost:3000/messages/new" do %>
<%= link_to "New hello", new_message_path %>
<% end %> Not sure if this is an actual issue, as I only found out because I'm porting this to Laravel, and in there the URL helpers generate the full URL, but in Rails the |
I have a page with a lazy-loading Turbo Frame on it, and when the content reloads, the frame gets replaced with the placeholder from the main page. Would it be preferred to reload any lazy-loaded frames on the page so their changes (if any) are reflected too?
The text was updated successfully, but these errors were encountered: