forked from fixin.me/fixin.me
Rewrite stream rendering to avoid client-side expanding
* adding streams in client breaks things (e.g. autofocus) * some tasks need to be performed in one stream action to avoid flickering (e.g. table row substitution)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<%# TODO: make sure turbo_stream layout is used in new/edit %>
|
||||
<%= turbo_stream.replace @unit, partial: 'form', locals: {id: dom_id(@unit, :edit)} %>
|
||||
|
||||
<%= turbo_stream.update :unit_form_frame do %>
|
||||
<%= form_with model: @unit, html: {id: :unit_form} do %>
|
||||
<% end %>
|
||||
<% end unless @unit.errors.present? %>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream.replace_form @unit, partial: 'form', locals: {link_id: dom_id(@unit, :edit)} %>
|
||||
|
||||
Reference in New Issue
Block a user